fix(ci): build and push only after lint and tests pass #138

Merged
Sebi merged 1 commits from fix/ci-order into main 2026-11-23 19:59:04 +00:00
Owner

CI order: build now needs: [lint, test] (and image already needs build), so nothing is built or pushed from code that fails lint or tests. Before, the jobs ran side by side and a failing test did not stop the images from main being pushed.

Flaky TestBackgroundRefresh (TempDir RemoveAll cleanup: directory not empty on CI): a refresh started by a visit puts the new snapshot into the cache before writing it to disk, so the test saw the new page, ended, and Go removed the cache directory while the snapshot was being written. Visit-triggered refreshes are now tracked (sync.WaitGroup), Server.Wait waits for them, and the test harness registers it as cleanup, which runs before the TempDir's. Not reproducible locally (300 runs without the fix passed on a fast disk); -race -count=30 passes with it.

🤖 Generated with Claude Code

https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3

**CI order**: `build` now `needs: [lint, test]` (and `image` already needs `build`), so nothing is built or pushed from code that fails lint or tests. Before, the jobs ran side by side and a failing test did not stop the images from main being pushed. **Flaky TestBackgroundRefresh** (`TempDir RemoveAll cleanup: directory not empty` on CI): a refresh started by a visit puts the new snapshot into the cache before writing it to disk, so the test saw the new page, ended, and Go removed the cache directory while the snapshot was being written. Visit-triggered refreshes are now tracked (`sync.WaitGroup`), `Server.Wait` waits for them, and the test harness registers it as cleanup, which runs before the TempDir's. Not reproducible locally (300 runs without the fix passed on a fast disk); `-race -count=30` passes with it. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi added 1 commit 2026-11-23 18:55:51 +00:00
fix(ci): build and push only after lint and tests pass
ci / lint (push) Skipped
ci / test (push) Skipped
ci / build (push) Skipped
ci / image (push) Skipped
ci / lint (pull_request) Successful in 12m8s
ci / test (pull_request) Successful in 12m14s
ci / build (pull_request) Successful in 11m42s
ci / image (pull_request) Successful in 4m32s
4acea46736
The build job, and so the image job after it, now needs lint and test:
a failing test no longer lets CI go on to push images from main.

TestBackgroundRefresh failed on CI now and then with "TempDir RemoveAll
cleanup: directory not empty": a refresh started by a visit updates the
cache before writing the snapshot to disk, so the test could end and
remove the directory mid-write. Visit-triggered refreshes are tracked,
and the test harness waits for them before its directory is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017GpWAskjmYtZpuQ5JwYTX3
Sebi merged commit ac0d212a01 into main 2026-11-23 19:59:03 +00:00
Sebi deleted branch fix/ci-order 2026-11-23 19:59:05 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ZB-Server/uptimesebi#138