Skip to content

Commit d6682ac

Browse files
authored
test: add test coverage workflow
1 parent 3e94b30 commit d6682ac

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/go.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Go
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
11+
build:
12+
name: Build
13+
runs-on: ubuntu-latest
14+
steps:
15+
16+
- name: Set up Go 1.x
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: ^1.13
20+
id: go
21+
22+
- name: Check out code into the Go module directory
23+
uses: actions/checkout@v2
24+
25+
- name: Test
26+
run: go test -covermode=count -coverprofile=profile.cov ./pkg/...
27+
28+
- name: Send coverage
29+
env:
30+
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: |
32+
GO111MODULE=off go get github.com/mattn/goveralls
33+
$(go env GOPATH)/bin/goveralls -coverprofile=profile.cov -service=github

0 commit comments

Comments
 (0)