From cf6f74a6e35cc900d886f9813d465c9b8d3520ec Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Tue, 10 Nov 2026 17:06:27 +0100 Subject: [PATCH 1/2] Run the tests on macOS and Windows in CI --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ docs/development.md | 2 +- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6459a2a..12c4a9c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,6 +35,30 @@ jobs: - run: go tool govulncheck ./... - run: go tool gotestsum --format github-actions -- -race -count=1 ./... + platforms: + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - windows-latest + defaults: + run: + shell: bash + steps: + # Git for Windows converts line endings to CRLF on checkout by default. + - run: git config --global core.autocrlf false + - uses: actions/checkout@v7.0.1 + with: + persist-credentials: false + - uses: actions/setup-go@v7.0.0 + with: + go-version-file: go.mod + - run: go vet ./... + - run: go tool gotestsum --format github-actions -- -race -count=1 ./... + # release.yml only runs on tags, so a stale lockfile entry would otherwise break the next release. actions-lock: runs-on: ubuntu-latest diff --git a/docs/development.md b/docs/development.md index 9589dfe..c6b4ffb 100644 --- a/docs/development.md +++ b/docs/development.md @@ -23,7 +23,7 @@ go test ./internal/report -run '^$' -fuzz '^FuzzText$' -fuzztime 60s The provider protocol filter is fuzzed in harness, with its model proxy. -On each push, CI checks formatting and `go mod tidy`, then runs `go vet`, `staticcheck`, `govulncheck`, `zizmor` on the workflows and the action, the tests, the three fuzz targets and the Docker isolation tests of both agent images. Make both isolation jobs required release checks. +On each push, CI checks formatting and `go mod tidy`, then runs `go vet`, `staticcheck`, `govulncheck`, `zizmor` on the workflows and the action, the tests on Linux, macOS and Windows, the three fuzz targets and the Docker isolation tests of both agent images. Make both isolation jobs required release checks. ## Isolation tests From 9d782c63d38bf7cefd6a21e7edc2925198f6cd19 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Tue, 10 Nov 2026 17:25:09 +0100 Subject: [PATCH 2/2] Stop relying on the clock advancing in the spent run time test --- internal/triage/triage_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/triage/triage_test.go b/internal/triage/triage_test.go index 5bec1ed..e40f7db 100644 --- a/internal/triage/triage_test.go +++ b/internal/triage/triage_test.go @@ -712,7 +712,7 @@ func TestRunTriagesEveryNewAdvisoryWithinItsTime(t *testing.T) { func TestRunLeavesTheAdvisoriesToTheNextRunOnceItsTimeIsSpent(t *testing.T) { defer func(d time.Duration) { maxRunDuration = d }(maxRunDuration) - maxRunDuration = maxAdvisoryDuration + maxRunDuration = maxAdvisoryDuration - time.Second gh, eng := newFixture(), &fakeEngine{} var logs strings.Builder