Skip to content

Commit dc32125

Browse files
committed
Check if containers exit non-zero instead of the compose command
As per the linked issue, the database setup container exiting is actually what caused the non-zero return value for docker compose up, even when we expect the database setup container to exit.
1 parent 1050576 commit dc32125

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ jobs:
1919
with:
2020
python-version: 3.x
2121

22-
- run: docker compose --profile "python" --profile "php" up -d --wait
22+
# https://github.com/docker/compose/issues/10596
23+
- run: docker compose --profile "python" --profile "php" up --detach --wait --remove-orphans || exit $(docker compose ps -q | xargs docker inspect -f '{{.State.ExitCode}}' | grep -v '^0' | wc -l)
2324
- run: docker container ls && docker image ls
2425
- run: docker exec openml-python-rest-api /bin/bash -c "curl http://openml-php-rest-api:80/api/v1/json/data/1"
2526
- run: docker exec openml-python-rest-api python -m pytest -xv -m "php"

0 commit comments

Comments
 (0)