Skip to content

Commit 1671960

Browse files
committed
Fix tests on CI
1 parent 0310885 commit 1671960

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/dockerpush.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff 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

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ build:
5757
test-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

0 commit comments

Comments
 (0)