Skip to content

negative filters fix #81

negative filters fix

negative filters fix #81

Workflow file for this run

on:
push:
branches: [ main ]
pull_request:
branches: [ '**' ]
name: Go
jobs:
test:
strategy:
matrix:
go-version: [1.13.x, 1.19.x, 1.20.x]
platform: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- name: Download Go dependencies
env:
GOPROXY: "https://proxy.golang.org"
run: go mod download
- name: Test
run: go test -count=1 ./...
- name: Test with -race
run: go test -race -count=1 ./...
- name: Integration test
if: matrix.platform == 'ubuntu-latest'
run: go test -exec=sudo -tags integration ./...
- name: gofmt check
if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.20')
run: diff <(echo -n) <(gofmt -d .)
- name: staticcheck.io
if: matrix.platform == 'ubuntu-latest' && startsWith(matrix.go-version, '1.20')
# https://github.com/actions/setup-go/issues/14
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go install honnef.co/go/tools/cmd/staticcheck@2023.1
staticcheck -checks all .
# ignore should not use ALL_CAPS in Go names in internal/
staticcheck -checks all,-ST1003 ./internal/...