CI: exclude Go 1.13 on arm64 OS X #113
This file contains 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
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ '**' ] | |
name: Go | |
jobs: | |
test: | |
strategy: | |
matrix: | |
go-version: [1.13.x, 1.22.x, 1.23.x] | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
exclude: | |
# There is no arm64 version of Go for darwin. | |
# This exclude can be removed if the minimal Go version | |
# is > Go 1.16. | |
- go-version: "1.13.x" | |
platform: "macos-latest" | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- name: Download Go dependencies | |
env: | |
GOPROXY: "https://proxy.golang.org" | |
run: go mod download | |
- name: Test | |
run: go test -count=1 ./... | |
- name: Test with -race | |
run: go test -race -count=1 ./... | |
- name: Integration test | |
if: matrix.platform == 'ubuntu-latest' | |
run: go test -exec=sudo -tags integration ./... | |
- name: gofmt check | |
if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.23') | |
run: diff <(echo -n) <(gofmt -d .) | |
- name: staticcheck.io | |
if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.23') | |
uses: dominikh/staticcheck-action@v1.3.0 | |
with: | |
version: "2024.1.1" | |
install-go: false | |
cache-key: ${{ matrix.go-version }} | |
working-directory: . | |
- name: staticcheck.io - internal | |
if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.23') | |
uses: dominikh/staticcheck-action@v1.3.1 | |
with: | |
version: "2024.1.1" | |
install-go: false | |
cache-key: ${{ matrix.go-version }} | |
working-directory: internal | |
# ignore should not use ALL_CAPS in Go names in internal/ | |
checks: all,-ST1003 |