Tests #5
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: Tests | |
on: | |
push: | |
branches: | |
- v1 | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Test and lint | |
strategy: | |
fail-fast: false | |
matrix: | |
go: [ '1.18', '1.17' ] | |
os: [ 'windows-latest', 'ubuntu-latest', 'macOS-latest' ] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Run go fmt (Go ${{ matrix.go }}) | |
if: runner.os != 'Windows' | |
run: diff -u <(echo -n) <(gofmt -d -s .) | |
- name: Run go vet | |
run: make vet | |
- name: Run staticcheck (Go ${{ matrix.go }}) | |
uses: dominikh/staticcheck-action@v1.2.0 | |
with: | |
version: "2022.1" | |
install-go: false | |
cache-key: ${{ matrix.go }} | |
- name: Run Unit tests (Go ${{ matrix.go }}) | |
run: make test |