-
Notifications
You must be signed in to change notification settings - Fork 26
56 lines (53 loc) · 1.54 KB
/
go.yaml
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Testing
on:
pull_request: {}
push:
branches:
- main
jobs:
test:
strategy:
matrix:
go: [ '1.19' ]
os: [ ubuntu-latest, macOS-latest ]
runs-on: ${{matrix.os}}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: ${{matrix.go}}
- name: Install deps
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
cd /tmp
go install -v github.com/wadey/gocovmerge@latest
go install -v github.com/golangci/golangci-lint/cmd/golangci-lint@latest
- name: Lint
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go mod tidy
go vet ./...
golangci-lint run \
--no-config --exclude-use-default=false --max-same-issues=0 \
--disable errcheck \
--enable stylecheck \
--enable unconvert \
--enable gocyclo \
--enable gofmt \
--enable misspell \
--enable unparam \
--enable nakedret \
--enable prealloc \
--enable gocritic \
--enable misspell \
./...
- name: Run tests
shell: bash --noprofile --norc -x -eo pipefail {0}
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
run: |
export GOPATH="$RUNNER_WORKSPACE"
go test -v -race -p 1 ./...
./scripts/cov.sh CI