-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (32 loc) · 828 Bytes
/
coverage.yml
File metadata and controls
34 lines (32 loc) · 828 Bytes
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
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
name: coverage
jobs:
coverage:
runs-on: ubuntu-latest
steps:
-
uses: actions/checkout@v3
-
uses: actions/setup-go@v3
with:
go-version: 1.18.2
-
name: Calculate coverage
run: |
go test -v -covermode=count -coverprofile=coverage.out ./...
-
name: Convert coverage.out to coverage.lcov
uses: jandelgado/gcov2lcov-action@v1.0.6
env:
# add GOROOT env manually because of failing tests
GOROOT: "/opt/hostedtoolcache/go/1.18.2/x64"
-
name: Coveralls
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.github_token }}
path-to-lcov: coverage.lcov