diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa86150..3817dcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] # amd64, arm64 + os: [ubuntu-latest, ubuntu-24.04-arm] # amd64, arm64 go: [stable, oldstable] runs-on: ${{ matrix.os }} timeout-minutes: 15 @@ -48,6 +48,42 @@ jobs: - name: Benchmarks compile and run once run: go test -run=NONE -bench=. -benchtime=1x ./... + # Not required by "CI passed": macOS runners are often short (jobs queue for + # minutes or are never picked up), and arm64 is covered by ubuntu-24.04-arm. + test-macos: + name: Test, non-blocking (Go ${{ matrix.go }}, ${{ matrix.os }}) + strategy: + fail-fast: false + matrix: + os: [macos-latest] # arm64 + go: [stable] + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-go@v7 + with: + go-version: ${{ matrix.go }} + cache: true + + - name: Verify go mod tidy + run: | + go mod tidy + git diff --exit-code -- go.mod go.sum + + - name: Vet + run: go vet ./... + + - name: Test + run: go test -race -failfast -count=1 ./... + + - name: Test sqlstore against SQLite + run: go test -C sqlstore/sqlitetest -race -failfast -count=1 ./... + + - name: Benchmarks compile and run once + run: go test -run=NONE -bench=. -benchtime=1x ./... + lint: name: Lint runs-on: ubuntu-latest diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 14fc843..b62c5b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,8 +44,8 @@ documentation changed; `make generate` does the same locally. go test -C sqlstore/sqlitetest -race -count=1 ./... # SQLite integration tests (cd cmd/gen && golangci-lint run ./...) # the generator module -CI runs the same checks on the stable and oldstable Go releases, on Linux -(amd64) and macOS (arm64), plus `govulncheck`, CodeQL and a coverage gate. +CI runs the same checks on the stable and oldstable Go releases, on Linux (amd64 and arm64) +and on macOS (arm64, stable Go only; it does not block merging), plus `govulncheck`, CodeQL and a coverage gate. Coverage is measured on hand-written code only; generated files are excluded. ## Changes on a hot path