-
-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (41 loc) · 1.09 KB
/
test_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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# yaml-language-server: $schema=https://json-schema.org/draft-07/schema#
name: Test Coverage
on:
push:
pull_request:
jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GCC_VERSION: 12
steps:
- name: Checkout codebase
uses: actions/checkout@v3
- name: Setup bazel
uses: jwlawson/actions-setup-bazel@v1
with:
bazel-version: "latest"
- name: Setup GCC
uses: Dup4/actions-setup-gcc@v1
with:
version: ${{ env.GCC_VERSION }}
- name: Install lcov
run: |
sudo apt install lcov
- name: Coverage
run: |
make bazel_coverage
make bazel_coverage_genhtml
cp ./bazel-testlogs/unittest/coverage.dat coverage.dat
- name: upload coverage artifact
uses: actions/upload-artifact@v3
with:
name: coverage
path: |
bazel-coverage-html
coverage.dat
- name: Upload coverage to CodeCov
uses: codecov/codecov-action@v3
with:
files: coverage.dat
verbose: true