From 7893eb424cbe07ee5cb86059811e40bb258f79d5 Mon Sep 17 00:00:00 2001 From: "Jakub A. W" Date: Wed, 17 Jun 2026 15:29:31 +0200 Subject: [PATCH] ci: collapse go test jobs into a matrix and un-gate build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The unit, e2e, integration, and contract jobs shared identical checkout/setup-go/cache boilerplate and differed only in the test command, so they now run as a single matrix job. Check names are preserved (Unit Tests, E2E Tests, Integration Tests, Contract Replay Tests) so required status checks keep matching. The build job no longer waits on the test jobs — compiling the binary doesn't depend on tests passing, so it now runs in parallel and shortens the critical path. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/test.yml | 72 ++++++++++++-------------------------- 1 file changed, 22 insertions(+), 50 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9ff4258d..8877d36f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -37,9 +37,24 @@ jobs: # the schema fetch is reliable again; track in this PR/branch discussion. verify: false - test-unit: - name: Unit Tests + # Unit, E2E, integration, and contract suites share identical setup and + # differ only in the test command, so they run as one matrix. + go-tests: + name: ${{ matrix.name }} runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - name: Unit Tests + cmd: make test-race + coverage: true + - name: E2E Tests + cmd: go test -v -tags=e2e -timeout=5m ./tests/e2e/... + - name: Integration Tests + cmd: go test -v -tags=integration -timeout=10m ./tests/integration/... + - name: Contract Replay Tests + cmd: go test -v -tags=contract -timeout=5m ./tests/contract/... steps: - uses: actions/checkout@v6 @@ -49,10 +64,11 @@ jobs: go-version: ${{ env.GO_VERSION }} cache: true - - name: Run unit tests - run: make test-race + - name: Run tests + run: ${{ matrix.cmd }} - name: Upload coverage + if: matrix.coverage uses: codecov/codecov-action@v7 with: files: ./coverage.out @@ -73,51 +89,6 @@ jobs: - name: Run dashboard JavaScript tests run: make test-dashboard - test-e2e: - name: E2E Tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - cache: true - - - name: Run E2E tests - run: go test -v -tags=e2e -timeout=5m ./tests/e2e/... - - integration: - name: Integration Tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - cache: true - - - name: Run integration tests - run: go test -v -tags=integration -timeout=10m ./tests/integration/... - - test-contract: - name: Contract Replay Tests - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v6 - - - name: Set up Go - uses: actions/setup-go@v6 - with: - go-version: ${{ env.GO_VERSION }} - cache: true - - - name: Run contract replay tests - run: go test -v -tags=contract -timeout=5m ./tests/contract/... - performance: name: Performance Guard runs-on: ubuntu-latest @@ -172,10 +143,11 @@ jobs: run: npx mint validate working-directory: docs + # Compiling the binary doesn't depend on tests passing, so this runs in + # parallel with the test jobs rather than gating behind them. build: name: Build runs-on: ubuntu-latest - needs: [lint, test-unit, test-dashboard, test-e2e, integration, test-contract, performance] steps: - uses: actions/checkout@v6