-
-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (29 loc) · 842 Bytes
/
test.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
on: [ push, pull_request ]
name: test
env:
GO_VERSION: "1.16"
jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Install Go
if: success()
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Checkout code
uses: actions/checkout@v3
- name: Calc coverage
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go test -v -covermode=count -coverprofile=coverage.out -run ^Test ./...
- name: Convert coverage to lcov
uses: jandelgado/[email protected]
with:
infile: coverage.out
outfile: coverage.lcov
- name: Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov