ci: the integration lane runs only packages with database tests, built in parallel first
release / go (push) Successful in 1m52s
release / web (push) Failing after 5s
release / govulncheck (push) Successful in 19s
release / integration (push) Successful in 3m15s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Publish the release image to GHCR (dispatch only) (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 4m8s
release / android (push) Canceled after 4m33s
release / go (push) Successful in 1m52s
release / web (push) Failing after 5s
release / govulncheck (push) Successful in 19s
release / integration (push) Successful in 3m15s
release / Attach APK to the Release (tag releases only) (push) Canceled after 0s
release / Build + push container image (push) Canceled after 0s
release / Publish the release image to GHCR (dispatch only) (push) Canceled after 0s
release / Verify release artifacts (tag releases only) (push) Canceled after 0s
release / Build signed APK (push) Canceled after 4m8s
release / android (push) Canceled after 4m33s
The integration job ran `go test -p 1 -race ./...`: every package, one at a time, including 18 with no database test whose unit tests the go lane had already run. -p 1 also serialized compiling, about 50s before the first test ran. ci/db-test-packages.sh lists the packages whose tests reach Postgres (through internal/dbtest or MINSTREL_TEST_DATABASE_URL); a package that mentions neither cannot run a database test. The job builds those test binaries with full parallelism (-run '^$'), then runs them serially as before. make test-integration uses the same list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -38,9 +38,10 @@ test-short:
|
||||
test-integration:
|
||||
docker compose up -d postgres
|
||||
-docker compose exec -T postgres createdb -U minstrel minstrel_test
|
||||
# -p 1: integration packages share one test DB and each TRUNCATEs it;
|
||||
# concurrent package binaries deadlock on TRUNCATE. Serialize packages.
|
||||
MINSTREL_TEST_DATABASE_URL=postgres://minstrel:minstrel@localhost:5432/minstrel_test?sslmode=disable go test -p 1 -race ./...
|
||||
# Only packages with database tests; test-short covers the rest.
|
||||
# -p 1: they share one test DB and each TRUNCATEs it; concurrent
|
||||
# package binaries deadlock on TRUNCATE. Serialize packages.
|
||||
MINSTREL_TEST_DATABASE_URL=postgres://minstrel:minstrel@localhost:5432/minstrel_test?sslmode=disable go test -p 1 -race $$(sh ci/db-test-packages.sh)
|
||||
|
||||
lint:
|
||||
golangci-lint run ./...
|
||||
|
||||
Reference in New Issue
Block a user