Skip to content

Rollback gofmt

Rollback gofmt #8

Workflow file for this run

name: CI
on: [push, pull_request]
env:
CI_GO_VERSION: "1.21"
jobs:
gofmt:
name: Validate gofmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "$CI_GO_VERSION"
- run: if [ $(gofmt -s -l . | wc -l) -gt 0 ]; then exit 1; fi
staticcheck:
name: Validate staticcheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "$$CI_GO_VERSION"
- run: "go install honnef.co/go/tools/cmd/[email protected]"
- 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'