diff --git a/.github/workflows/README.md b/.github/workflows/README.md index 892ceeebe..2f1cbaf8d 100644 --- a/.github/workflows/README.md +++ b/.github/workflows/README.md @@ -31,7 +31,7 @@ Runs comprehensive quality checks on every pull request and push to main branch. 1. **Lint** - golangci-lint, go vet 2. **Unit Tests** - Go tests with race detection, coverage reporting -3. **Integration Tests** - Tests with real PostgreSQL +3. **Integration Tests** - Tests with real PostgreSQL: `integration`-tagged tests and tests that skip under `-short`, sharded across parallel runners (selected by `scripts/integration-test-selection.sh`) 4. **Docker Build** - Build, check and scan the Docker image natively for linux/amd64 and linux/arm64 5. **Terraform Validate** - Validate all Terraform configs (AWS, GCP, Azure) 6. **Security Scan** - gosec, trivy, tfsec diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f2b682363..a31d6d4e3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -375,12 +375,64 @@ jobs: echo "::warning::Coverage is below 80% (current: ${coverage}%)" fi - # Integration tests with real PostgreSQL + # Integration tests with real PostgreSQL, sharded across parallel runners. + # + # Only the tests the Unit Tests job does not run are run here: those in + # `//go:build integration` files, plus untagged tests that skip themselves + # under -short. scripts/integration-test-selection.sh finds them and prints a + # `-run` regex per package; packages with none are not even compiled. Before + # that, this job re-ran every unit test under -tags=integration as well. + # + # Each leg runs the packages INTEGRATION_SHARDS gives its shard; `*` marks + # the catch-all shard, which takes every package with integration tests that + # no other shard names, so a new package is never silently skipped. Balance + # the shards by the per-package "ok ...