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 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