Skip to content

⭐️⭐️⭐️ Open-source, self-hosted alternative to Linear and Plane. Project management and issue tracking where teams and AI agents work side by side to plan and ship products.

fix(ci): run test gate without --abort-on-container-exit (#12)

Croff656863f04a08
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 047d096a..4ed5cc37 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -79,11 +79,17 @@ jobs:
# Integration tests need a live database, so they run in the compose gate:
# a throwaway Postgres and MinIO, with the api built from the production
- # Dockerfile. Non-zero exit on any failing test.
+ # Dockerfile. Building both api-test and worker-test also verifies their
+ # Dockerfiles build.
+ - name: Build test images
+ run: docker compose -f docker-compose.test.yml build
+
+ # `run` starts api-test's dependencies (Postgres healthy, the MinIO bucket
+ # init completed), runs the suite, and exits with its code. It does not use
+ # --abort-on-container-exit, which would tear the stack down the moment the
+ # one-shot minio-test-init exits, before api-test starts.
- name: Run the compose test gate
- run: |
- docker compose -f docker-compose.test.yml up --build \
- --abort-on-container-exit --exit-code-from api-test
+ run: docker compose -f docker-compose.test.yml run --rm api-test
- name: Tear down
if: always()
diff --git a/AGENTS.md b/AGENTS.md
index 7926e6ab..a2899b7f 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -132,16 +132,22 @@ its Dockerfile CMD). `bot` runs Telegram long polling and must stay at one repli
`docker-compose.test.yml` runs the test suite against a throwaway Postgres, in a
container built from the same image as production. Integration tests need a live
database, so they cannot run during `docker build` — this compose file is the
-mechanism instead. One command, non-zero exit on any failing test:
+mechanism instead. Build the images, then run the suite (non-zero exit on any
+failing test):
```bash
-docker compose -f docker-compose.test.yml up --build \
- --abort-on-container-exit --exit-code-from api-test
+docker compose -f docker-compose.test.yml build
+docker compose -f docker-compose.test.yml run --rm api-test
```
+`run` starts api-test's dependencies (Postgres healthy, the MinIO bucket init
+completed), runs the suite, and exits with its code. It does not use
+`--abort-on-container-exit`, which tears the stack down the moment the one-shot
+`minio-test-init` exits, before api-test starts.
+
The test database is created by the `postgres-test` service (`POSTGRES_DB=vela_test`,
-tmpfs — nothing persists). The `test` job in `.github/workflows/ci.yml` runs this exact
-command.
+tmpfs — nothing persists). The `test` job in `.github/workflows/ci.yml` runs these
+same commands.
## CI
diff --git a/docker-compose.test.yml b/docker-compose.test.yml
index 3fa832a4..798e60e1 100644
--- a/docker-compose.test.yml
+++ b/docker-compose.test.yml
@@ -3,9 +3,10 @@
# built from the same image as production. Integration tests need a live database,
# so they cannot run during `docker build` (no DB there) — they run here instead.
#
-# One command (non-zero exit on any failing test):
-# docker compose -f docker-compose.test.yml up --build \
-# --abort-on-container-exit --exit-code-from api-test
+# Build the images, then run the suite (non-zero exit on any failing test). `run`
+# starts api-test's dependencies, runs the suite, and exits with its code:
+# docker compose -f docker-compose.test.yml build
+# docker compose -f docker-compose.test.yml run --rm api-test
#
# The test database is created automatically by the postgres-test service
# (POSTGRES_DB=vela_test); its data is tmpfs, so nothing persists between runs.