Skip to content

Commit

Permalink
Fix CI #1594
Browse files Browse the repository at this point in the history
  • Loading branch information
dennissiemensma committed Jun 17, 2024
1 parent 3e3f51d commit ade0430
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/automated-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
sleep 5
- name: Check flake8
run: docker compose exec tests-dsmr-app poetry run flake8
run: docker compose run tests-dsmr-app poetry run flake8 -v

- name: Run PostgreSQL tests
run: docker compose exec tests-dsmr-app poetry run pytest
run: docker compose run tests-dsmr-app poetry run pytest
12 changes: 12 additions & 0 deletions provisioning/container/compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ services:
ports:
- '8000:8000'
depends_on:
dev-dsmr-db:
condition: service_healthy
mosquitto:
condition: service_started
influxdb:
Expand All @@ -29,6 +31,11 @@ services:
container_name: dev-dsmr-db
image: postgres:15-alpine
restart: 'unless-stopped'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dsmrreader"]
interval: 1s
timeout: 5s
retries: 20
ports:
- '5432:5432'
env_file:
Expand Down Expand Up @@ -89,6 +96,11 @@ services:
container_name: tests-dsmr-db
image: postgres:15-alpine
restart: 'unless-stopped'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U testuser"]
interval: 1s
timeout: 5s
retries: 20
environment:
POSTGRES_DB: 'test_dsmrreader'
POSTGRES_USER: 'testuser'
Expand Down
3 changes: 2 additions & 1 deletion provisioning/container/compose.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ services:
target: local-dsmrreader-dev
volumes:
- ./src:/app
- /app/.venv # Prevents mirroring it to host
depends_on:
tests-dsmr-db:
condition: service_healthy
Expand All @@ -31,7 +32,7 @@ services:
image: postgres:15-alpine
restart: 'unless-stopped'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U dsmrreader"]
test: ["CMD-SHELL", "pg_isready -U dbtestuser"]
interval: 1s
timeout: 5s
retries: 20
Expand Down

0 comments on commit ade0430

Please sign in to comment.