reduce dependencies (#73) #184
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
name: Go | |
on: [push] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go: [ '1.19', '1.21' ] | |
steps: | |
- name: Set up Go ${{ matrix.go }} | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '${{ matrix.go }}' | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v3 | |
with: | |
version: v1.55.1 | |
- name: Install go bits | |
run: | | |
go install golang.org/x/tools/cmd/goimports@latest | |
export PATH=$PATH:$(go env GOPATH)/bin | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: | | |
export PATH=$PATH:$(go env GOPATH)/bin | |
TESTFLAGS='-cover' make | |
# Much slower, so don't require for PR merge. | |
races: | |
name: Check for Races | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go ${{ matrix.go }} | |
uses: actions/setup-go@v1 | |
with: | |
go-version: '${{ matrix.go }}' | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v1 | |
- name: Test | |
run: go test -race -short |