-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (42 loc) · 1.21 KB
/
ci.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
push:
branches:
- easyjson
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
- name: Install dependencies
run: go mod tidy
- name: Run go vet
run: go vet ./...
- name: Install errcheck
run: go install github.com/kisielk/errcheck@latest
- name: Run errcheck
run: errcheck ./...
- name: Install golangci-lint
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.51.1
- name: Run golangci-lint
run: golangci-lint run
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Run staticcheck
run: staticcheck ./...
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version: '1.19'
- name: Install dependencies
run: go mod tidy
- name: Run tests
run: go test -race -vet=off -run '!(ws|server)' ./...