-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (38 loc) · 1.29 KB
/
test.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
name: Test
on: push
env:
GO111MODULE: on
jobs:
build:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.21', '1.21.x' ]
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Setup Go ${{ matrix.go-version }}
uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go-version }}
- name: Display Go version
run: go version
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- name: Install cover
run: go get -u golang.org/x/tools/cmd/cover
- name: Install vet
run: go get -u github.com/mattn/goveralls
- name: Install goveralls
run: go get -u github.com/mattn/goveralls
- name: Staticcheck
run: staticcheck -checks="all,-ST1000,-SA1019" github.com/msales/gox/...
- name: Vet
run: go vet ./...
- name: Test
run: go test -bench=. -covermode=count -coverprofile=profile_full.cov -coverpkg=github.com/msales/gox/... github.com/msales/gox/...
- name: Goveralls
run: |
cat profile_full.cov | grep -v .pb.go | grep -v mock | grep -v test > profile.cov;
goveralls -coverprofile=profile.cov -service=github || true;