support optional unified diffs #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: CI | |
on: [pull_request, workflow_dispatch] | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: 1.21 | |
- name: Install dependencies | |
run: | | |
go install golang.org/x/lint/golint@latest | |
go install honnef.co/go/tools/cmd/staticcheck@latest | |
- name: Lint | |
run: | | |
test -z $(gofmt -s -l $(find . -type f -iname '*.go')) | |
staticcheck ./... | |
golint -set_exit_status ./... | |
go vet ./... | |
Test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
go: ['1.17.5', '1.19', '1.21'] | |
name: Test using go ${{ matrix.go }} on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Test | |
run: go test -v -race ./... |