Skip to content

Commit

Permalink
Merge pull request #2477 from camptocamp/docker-compose-117
Browse files Browse the repository at this point in the history
Use Docker Compose version 2
  • Loading branch information
sbrunner authored Aug 8, 2024
2 parents 8f5171a + 838e638 commit b6a088c
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,36 +7,36 @@ build:

PHONY: tests
tests: build
docker-compose stop --timeout=0
docker-compose down || true
docker-compose up -d
docker compose stop --timeout=0
docker compose down || true
docker compose up -d

# Wait for DB to be up
while ! docker-compose exec -T test psql -h db -p 5432 -U postgres -v ON_ERROR_STOP=1 -c "SELECT 1" -d tests; \
while ! docker compose exec -T test psql -h db -p 5432 -U postgres -v ON_ERROR_STOP=1 -c "SELECT 1" -d tests; \
do \
echo "Waiting for DB to be UP"; \
sleep 1; \
done

c2cciutils-docker-logs

docker-compose exec -T test pytest
docker compose exec -T test pytest

c2cciutils-docker-logs
docker-compose down
docker compose down

PHONY: tests-fast
tests-fast:
docker-compose up -d
docker compose up -d

# Wait for DB to be up
while ! docker-compose exec -T test psql -h db -p 5432 -U postgres -v ON_ERROR_STOP=1 -c "SELECT 1" -d tests; \
while ! docker compose exec -T test psql -h db -p 5432 -U postgres -v ON_ERROR_STOP=1 -c "SELECT 1" -d tests; \
do \
echo "Waiting for DB to be UP"; \
sleep 1; \
done

docker-compose exec -T test pytest --exitfirst #--last-failed
docker compose exec -T test pytest --exitfirst #--last-failed

PHONY: jsonschema
jsonschema:
Expand Down

0 comments on commit b6a088c

Please sign in to comment.