-
Notifications
You must be signed in to change notification settings - Fork 66
35 lines (30 loc) · 1.12 KB
/
coverage.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
name: Testing Coverage
on: [push, pull_request]
permissions:
contents: read
jobs:
build:
name: Test and Coverage
runs-on: ubuntu-latest
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4.2.1
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0
with:
go-version-file: "go.mod"
- name: Prepare coverage
run: mkdir coverage
- name: Test
run: SKIP_TYPES=time-dependent go test ./... -coverpkg=$( go list ./... | grep -v /tests | grep -v /tools | paste -sd "," -) -coverprofile coverage/coverage.out
- name: Coverage convert
uses: jandelgado/gcov2lcov-action@4e1989767862652e6ca8d3e2e61aabe6d43be28b # v1.1.1
with:
infile: coverage/coverage.out
outfile: coverage/lcov.info
- name: Coveralls report
uses: coverallsapp/github-action@1134c89e4bf10443bf8f0ec69640b667cfd91041 # v2.3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}