File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,11 +46,13 @@ jobs:
4646 # can use `FROM laxy:dev` without pulling from a remote registry.
4747 docker build . --file docker/laxy/Dockerfile --tag laxy:dev
4848
49- # Run unit tests inside Docker via the dedicated unit-tests service
50- # (db startup + readiness are handled by depends_on/healthcheck).
5149 docker compose --file docker-compose.test.yml build \
5250 --build-arg GIT_COMMIT=${{ github.sha }} unit-tests
53- docker compose --file docker-compose.test.yml run --rm unit-tests
51+
52+ # Use `up --exit-code-from` rather than `run` so that all services
53+ # (including db-test) are started with proper network attachment.
54+ docker compose --file docker-compose.test.yml up \
55+ --exit-code-from unit-tests --abort-on-container-exit
5456 else
5557 docker build . --file docker/laxy/Dockerfile
5658 fi
Original file line number Diff line number Diff line change 5757test-unit :
5858 #!/usr/bin/env bash
5959 echo " 🧪 Running unit tests with docker-compose.test.yml (pytest, unit-tests service)..."
60- docker compose -f docker-compose.test.yml run --rm unit-tests
60+ docker compose -f docker-compose.test.yml up --exit-code-from unit-tests --abort-on-container-exit
6161 status=$?
6262 echo " 🧹 Cleaning up test containers..."
6363 docker compose -f docker-compose.test.yml down -v
You can’t perform that action at this time.
0 commit comments