Skip to content

Test more Go versions #7

Test more Go versions

Test more Go versions #7

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
gofmt:
name: Validate gofmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.21"
- run: "[ $(gofmt -s -l . | wc -l) -gt 0 ] && exit 1"
staticcheck:
name: Validate staticcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.21"
- run: "go install honnef.co/go/tools/cmd/staticcheck@v0.4.6"
- run: "staticcheck ./..."
test:
strategy:
fail-fast: false
matrix:
os: [windows-latest, ubuntu-latest]
go: [
"1.2",
"1.3",
"1.4",
"1.5",
"1.6",
"1.7",
"1.8",
"1.9",
"1.10",
"1.11",
"1.12",
"1.13",
"1.14",
"1.15",
"1.16",
"1.17",
"1.18",
"1.19",
"1.20",
"1.21"
]
name: Run tests for Go v${{ matrix.go }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- run: go test ./...
if: matrix.os == 'windows-latest'
- run: go test --race ./...
if: matrix.os == 'ubuntu-latest'