Make GC comparisons more realistic #27
Workflow file for this run
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, pull_request] | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
max-parallel: 2 | |
matrix: | |
go: ["stable", "oldstable"] | |
steps: | |
- name: Set up Go ${{matrix.go}} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{matrix.go}} | |
check-latest: true | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Lint code | |
run: | | |
gofiles=$(find ./ -name '*.go') && [ -z "$gofiles" ] || unformatted=$(goimports -l $gofiles) && [ -z "$unformatted" ] || (echo >&2 "Go files must be formatted with gofmt. Following files has problem: $unformatted" && true); | |
diff <(echo -n) <(gofmt -s -d .) | |
export PATH=$PATH:$(go env GOPATH)/bin # temporary fix. See https://github.com/actions/setup-go/issues/14 | |
go install golang.org/x/lint/golint@latest | |
golint ./... | |
- name: Static code check | |
run: | | |
export PATH=$PATH:$(go env GOPATH)/bin | |
go install github.com/gordonklaus/ineffassign@latest | |
ineffassign ./... | |
go vet ./... | |
- name: Build | |
run: go build -v . | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
max-parallel: 2 | |
matrix: | |
go: ["stable", "oldstable"] | |
steps: | |
- name: Set up Go ${{matrix.go}} | |
uses: actions/setup-go@v3 | |
with: | |
go-version: ${{matrix.go}} | |
check-latest: true | |
id: go | |
- name: Check out code into the Go module directory | |
uses: actions/checkout@v3 | |
- name: Run Test | |
run: go test -v ./... |