forked from Mellanox/network-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
32 lines (25 loc) · 863 Bytes
/
coverage.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
name: Go Test Coverage with Coveralls
on: [pull_request, push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.21' # Set this to your Go version
- name: Run tests with coverage
run: |
make test-coverage
- name: Generate LCOV report
run: |
go install github.com/jandelgado/gcov2lcov@latest
gcov2lcov -infile=network-operator.cover -outfile=coverage.lcov
- name: Upload coverage to Coveralls
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.lcov
flag-name: run-flags-1 # Optional: Custom flag name for parallel builds