Skip to content

Commit

Permalink
Test syntax fix for docker compose commands. (#1984)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonoransun authored Aug 2, 2024
1 parent 1201817 commit f98bc51
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions .github/workflows/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ jobs:
- name: Build Docker Container
run: |
docker-compose build
docker compose build
- name: Run syntax checks
run: |
docker-compose run api bash -c 'touch /tmp/no-syntax-errors && find app lib config -name *.rb -exec bash -c "ruby -c {} >/dev/null || rm /tmp/no-syntax-errors" ";" && ls /tmp/no-syntax-errors'
docker compose run api bash -c 'touch /tmp/no-syntax-errors && find app lib config -name *.rb -exec bash -c "ruby -c {} >/dev/null || rm /tmp/no-syntax-errors" ";" && ls /tmp/no-syntax-errors'
- name: Run Container
run: docker-compose -f docker-compose.yml -f docker-test.yml up -d
run: docker compose -f docker-compose.yml -f docker-test.yml up -d

- name: Wait for the server to be ready
run: |
tail -f log/test.log &
until curl --silent -I -f --fail http://localhost:3000 ; do printf .; sleep 1; done
- name: Set up parallel environment
run: docker-compose exec -T api test/setup-parallel-env.sh
run: docker compose exec -T api test/setup-parallel-env.sh

- name: Precompile Assets
run: docker-compose exec -T api bundle exec rake assets:precompile
run: docker compose exec -T api bundle exec rake assets:precompile

- name: Prepare Parallel Runtime Log
run: |
Expand All @@ -86,7 +86,7 @@ jobs:
env:
TEST_RETRY_COUNT: 3
run: |
docker-compose exec -e TEST_RETRY_COUNT=$TEST_RETRY_COUNT -T -e PATTERN='models mailers integration workers lib contract' api test/run-tests.sh
docker compose exec -e TEST_RETRY_COUNT=$TEST_RETRY_COUNT -T -e PATTERN='models mailers integration workers lib contract' api test/run-tests.sh
- name: After Functional Test
env:
Expand All @@ -103,7 +103,7 @@ jobs:
ROLE_TO_ASSUME: ${{ secrets.AWS_ROLE_TO_ASSUME }}
AWS_REGION: eu-west-1
run: |
docker-compose exec -T -e GIT_BRANCH=$GIT_BRANCH \
docker compose exec -T -e GIT_BRANCH=$GIT_BRANCH \
-e GITHUB_EVENT=$GITHUB_EVENT \
-e GITHUB_TEST_RESULT=$GITHUB_TEST_RESULT \
-e GITHUB_REPO=$GITHUB_REPO \
Expand Down Expand Up @@ -161,22 +161,22 @@ jobs:
- name: Build Docker Container
run: |
docker-compose build
docker compose build
- name: Run syntax checks
run: |
docker-compose run api bash -c 'touch /tmp/no-syntax-errors && find app lib config -name *.rb -exec bash -c "ruby -c {} >/dev/null || rm /tmp/no-syntax-errors" ";" && ls /tmp/no-syntax-errors'
docker compose run api bash -c 'touch /tmp/no-syntax-errors && find app lib config -name *.rb -exec bash -c "ruby -c {} >/dev/null || rm /tmp/no-syntax-errors" ";" && ls /tmp/no-syntax-errors'
- name: Run Container
run: docker-compose -f docker-compose.yml -f docker-test.yml up -d
run: docker compose -f docker-compose.yml -f docker-test.yml up -d

- name: Wait for the server to be ready
run: |
tail -f log/test.log &
until curl --silent -I -f --fail http://localhost:3000 ; do printf .; sleep 1; done
- name: Set up parallel environment
run: docker-compose exec -T api test/setup-parallel-env.sh
run: docker compose exec -T api test/setup-parallel-env.sh

- name: Precompile Assets
run: docker-compose exec -T api bundle exec rake assets:precompile
run: docker compose exec -T api bundle exec rake assets:precompile

- name: Prepare Parallel Runtime Log
run: |
Expand All @@ -189,7 +189,7 @@ jobs:
env:
TEST_RETRY_COUNT: 3
run: |
docker-compose exec -e TEST_RETRY_COUNT=$TEST_RETRY_COUNT -T -e PATTERN='controllers contract' api test/run-tests.sh
docker compose exec -e TEST_RETRY_COUNT=$TEST_RETRY_COUNT -T -e PATTERN='controllers contract' api test/run-tests.sh
- name: After Unit Test
env:
Expand All @@ -206,7 +206,7 @@ jobs:
ROLE_TO_ASSUME: ${{ secrets.AWS_ROLE_TO_ASSUME }}
AWS_REGION: eu-west-1
run: |
docker-compose exec -T -e GIT_BRANCH=$GIT_BRANCH \
docker compose exec -T -e GIT_BRANCH=$GIT_BRANCH \
-e GITHUB_EVENT=$GITHUB_EVENT \
-e GITHUB_TEST_RESULT=$GITHUB_TEST_RESULT \
-e GITHUB_REPO=$GITHUB_REPO \
Expand Down Expand Up @@ -264,25 +264,25 @@ jobs:
- name: Build Docker Container
run: |
docker-compose build
docker compose build
- name: Run syntax checks
run: |
docker-compose run api bash -c 'touch /tmp/no-syntax-errors && find app lib config -name *.rb -exec bash -c "ruby -c {} >/dev/null || rm /tmp/no-syntax-errors" ";" && ls /tmp/no-syntax-errors'
docker compose run api bash -c 'touch /tmp/no-syntax-errors && find app lib config -name *.rb -exec bash -c "ruby -c {} >/dev/null || rm /tmp/no-syntax-errors" ";" && ls /tmp/no-syntax-errors'
- name: Run Container
run: docker-compose -f docker-compose.yml -f docker-test.yml up -d
run: docker compose -f docker-compose.yml -f docker-test.yml up -d

- name: Wait for the server to be ready
run: |
tail -f log/test.log &
until curl --silent -I -f --fail http://localhost:3000 ; do printf .; sleep 1; done
- name: Set up Parallel Environment
run: docker-compose exec -T api test/setup-parallel-env.sh
run: docker compose exec -T api test/setup-parallel-env.sh

- name: Precompile Assets
run: docker-compose exec -T api bundle exec rake assets:precompile
run: docker compose exec -T api bundle exec rake assets:precompile

- name: Prepare Parallel Runtime Log
run: |
Expand All @@ -295,7 +295,7 @@ jobs:
env:
TEST_RETRY_COUNT: 3
run: |
docker-compose exec -e TEST_RETRY_COUNT=$TEST_RETRY_COUNT -T -e PATTERN='controllers models mailers integration workers lib' api test/run-tests.sh
docker compose exec -e TEST_RETRY_COUNT=$TEST_RETRY_COUNT -T -e PATTERN='controllers models mailers integration workers lib' api test/run-tests.sh
- name: After Contract Test
env:
Expand All @@ -312,7 +312,7 @@ jobs:
ROLE_TO_ASSUME: ${{ secrets.AWS_ROLE_TO_ASSUME }}
AWS_REGION: eu-west-1
run: |
docker-compose exec -T -e GIT_BRANCH=$GIT_BRANCH \
docker compose exec -T -e GIT_BRANCH=$GIT_BRANCH \
-e GITHUB_EVENT=$GITHUB_EVENT \
-e GITHUB_TEST_RESULT=$GITHUB_TEST_RESULT \
-e GITHUB_REPO=$GITHUB_REPO \
Expand All @@ -324,4 +324,4 @@ jobs:
-e AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY \
-e ROLE_TO_ASSUME=$AWS_ROLE_TO_ASSUME \
-e AWS_REGION=$AWS_REGION \
-e AWS_CONFIG_FILE=/app/credentials api test/test-coverage.sh
-e AWS_CONFIG_FILE=/app/credentials api test/test-coverage.sh

0 comments on commit f98bc51

Please sign in to comment.