Skip to content

Commit 9e1ff14

Browse files
fix(ci): run make build in parallel with unit tests
## Summary ### Why? A sequential `make build` then `make test` made the unit-test job wait on a full compile that tests already cover. Dropping build entirely skipped the compile-only gate (`bazel build //...`). ### What? Split Build and Unit Test into two jobs that start together. Build still runs `make build`. Unit Test still runs `make test` with `--build_tests_only`. Required Checks waits on both. Each job keeps its own Bazel cache key (`github.job`). ## Test Plan CI on this PR: Build and Unit Test jobs run concurrently; Required Checks includes both. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 1308eb2 commit 9e1ff14

1 file changed

Lines changed: 20 additions & 4 deletions

File tree

.github/workflows/ci.yml

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,10 +68,25 @@ jobs:
6868
run: make check-gazelle
6969

7070
# ---------------------------------------------------------------------------
71-
# BUILD AND UNIT TESTS
71+
# BUILD AND UNIT TESTS (parallel jobs, separate Bazel caches)
7272
# ---------------------------------------------------------------------------
73-
build-and-unit-test:
74-
name: Build and Unit Test
73+
build:
74+
name: Build
75+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
79+
with:
80+
# This job executes untrusted PR code (make build/test/lint). Don't
81+
# leave the GITHUB_TOKEN in the workspace git config while it runs.
82+
persist-credentials: false
83+
- uses: ./.github/actions/setup
84+
85+
- name: Build project
86+
run: make build
87+
88+
unit-test:
89+
name: Unit Test
7590
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.draft == false }}
7691
runs-on: ubuntu-latest
7792
steps:
@@ -286,7 +301,8 @@ jobs:
286301
needs:
287302
- lint
288303
- tidy
289-
- build-and-unit-test
304+
- build
305+
- unit-test
290306
- e2e
291307
- gateway-integration-test
292308
- orchestrator-integration-test

0 commit comments

Comments
 (0)