-
-
Notifications
You must be signed in to change notification settings - Fork 320
35 lines (35 loc) · 1.1 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# Based on https://github.com/mvdan/github-actions-golang
on: [push, pull_request]
name: Tests
jobs:
test:
strategy:
matrix:
go-version: ['stable', 'oldstable']
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
- uses: actions/checkout@v3
- run: go test ./...
govulncheck:
runs-on: ubuntu-latest
steps:
- uses: golang/govulncheck-action@v1
gocritic_lint_ineffassign_checks:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v4
- uses: actions/checkout@v3
- run: |
set -e
sudo apt-get -qq update && sudo apt-get install -y shellcheck
go install github.com/go-critic/go-critic/cmd/gocritic@latest
go install golang.org/x/tools/cmd/goimports@latest
go install golang.org/x/lint/golint@latest
go install github.com/gordonklaus/ineffassign@latest
pip install pre-commit
pre-commit install
pre-commit run --all-files