Update test_v3.yml #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test - Docker | |
on: | |
push: | |
branches: | |
- dev | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
mkdir ${{ github.workspace }}/src | |
mkdir ${{ github.workspace }}/src/main | |
mkdir ${{ github.workspace }}/src/another | |
- name: Create file | |
uses: "finnp/create-file-action@master" | |
env: | |
FILE_NAME: "src/file.po" | |
FILE_DATA: ${{vars.TEMPLATE}} | |
- name: Check create file | |
run: | | |
ls -la | |
tail src/file.po | |
- name: Create new file for build | |
run: | | |
cp src/file.po ${{ github.workspace }}/src/main/file.po | |
cp src/file.po ${{ github.workspace }}/src/another/file.po | |
ls -la ${{ github.workspace }}/src | |
- uses: text-adi/build-language-i18n-action@prod | |
env: | |
DIR: src | |
- name: Check Test - 1 | |
run: | | |
expected_files=("file.po" "file.mo") | |
directory="./src/another" | |
for file in "${expected_files[@]}"; do | |
if [[ ! -f "$directory/$file" ]]; then | |
echo "File $file not found in dir $directory/$file" && ls -la $directory && exit 1 | |
fi | |
done | |
- name: Check Test - 2 | |
run: | | |
expected_files=("file.mo") | |
directory="./src/main" | |
for file in "${expected_files[@]}"; do | |
if [[ -f "$directory/$file" ]]; then | |
echo "File $file found in $directory/$file" && ls -la $directory && exit 1 | |
fi | |
done | |