Skip to content

Commit

Permalink
Update test-and-publish.yml
Browse files Browse the repository at this point in the history
Further updates for docker compose v2
  • Loading branch information
kenmeacham authored Aug 27, 2024
1 parent 997ac29 commit a067df7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/test-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ jobs:
- name: Build software
run: |
docker compose -f docker-compose.yml -f docker-compose.test.yml pull # Force download of any newer dependency images
docker-compose -f docker-compose.yml -f docker-compose.test.yml up -d --build
docker-compose -f docker-compose.yml -f docker-compose.test.yml images # Useful for debugging
docker-compose -f docker-compose.yml -f docker-compose.test.yml images -q | xargs docker inspect | grep -C3 RepoTags # Useful for debugging
docker compose -f docker-compose.yml -f docker-compose.test.yml up -d --build
docker compose -f docker-compose.yml -f docker-compose.test.yml images # Useful for debugging
docker compose -f docker-compose.yml -f docker-compose.test.yml images -q | xargs docker inspect | grep -C3 RepoTags # Useful for debugging
- name: Run tests
# Here we execute a command inside the ssm container built in the previous step.
# If the tests fail we still want to run the next step to archive the test results, so we set FAIL to 0 initially and to 1 on failure but in doing so ensure that the test command always succeeds.
# The value of ${FAIL} is written into ${GITHUB_ENV} for use in the next step.
run: |
FAIL=0
docker-compose -f docker-compose.yml -f docker-compose.test.yml exec -T ssm sh -c "cd /system-modeller && ./gradlew test" || FAIL=1
docker compose -f docker-compose.yml -f docker-compose.test.yml exec -T ssm sh -c "cd /system-modeller && ./gradlew test" || FAIL=1
docker cp $(docker-compose -f docker-compose.yml -f docker-compose.test.yml ps -q ssm):/system-modeller/build/build/reports/tests/test/ test-artifacts
echo "FAIL=${FAIL}" >> ${GITHUB_ENV}
Expand Down

0 comments on commit a067df7

Please sign in to comment.