[DEVREL-139] ci: modernize go-test matrix to supported Go versions #1205
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: test | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| branches: | |
| - master | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| go-version: [1.22.x, 1.23.x, 1.24.x] | |
| exclude: | |
| # Go 1.22's linker produces a -race test binary without an LC_UUID | |
| # load command on the current macOS runners, which dyld refuses to | |
| # load (golang/go#61229). Fixed in Go 1.23+, so keep macOS coverage | |
| # there; 1.22 is still covered on Linux and Windows. | |
| - os: macos-latest | |
| go-version: 1.22.x | |
| name: go-test | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| # Disable the build cache: a stale/mismatched Go build cache on the | |
| # macOS runners can produce a -race test binary without an LC_UUID | |
| # load command, which macOS dyld refuses to load (golang/go#61229). | |
| cache: false | |
| - uses: actions/checkout@v4 | |
| - name: go-test | |
| run: go test -race -v ./... |