-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (34 loc) · 1.12 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
name: Test
on: push
env:
GO111MODULE: on
jobs:
build:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.17','1.18','1.19','1.20','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 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: Vet
run: go vet ./...
- name: Test
run: go test -bench=. -covermode=count -coverprofile=profile_full.cov -coverpkg=github.com/msales/streams/... github.com/msales/streams/...
- 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;