Skip to content

Commit ed3632f

Browse files
committed
fix: ensure worker files are built before running tests
Previously, unit tests could fail if worker files hadn't been built yet. This adds an explicit build-main step to both the CI workflow and the test-unit Makefile target to ensure worker files exist before tests execute.
1 parent 1a0455d commit ed3632f

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ jobs:
7474

7575
- uses: ./.github/actions/setup-cmux
7676

77+
- name: Build worker files
78+
run: make build-main
79+
7780
- name: Run tests with coverage
7881
run: bun test --coverage --coverage-reporter=lcov ${{ github.event.inputs.test_filter || 'src' }}
7982

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ test-integration: node_modules/.installed build-main ## Run all tests (unit + in
207207
@bun test src
208208
@TEST_INTEGRATION=1 bun x jest tests
209209

210-
test-unit: node_modules/.installed ## Run unit tests
210+
test-unit: node_modules/.installed build-main ## Run unit tests
211211
@bun test src
212212

213213
test: test-unit ## Alias for test-unit

0 commit comments

Comments
 (0)