-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (34 loc) · 1.08 KB
/
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
name: Test Coverage
on: [push, workflow_dispatch]
jobs:
build:
name: Report Test Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build
- name: Install Coverage Tools
run: |
sudo apt-get update
sudo apt-get install -y lcov
- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake ..
- name: Build
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build .
- name: Prepare coverage data
working-directory: ${{github.workspace}}/build
shell: bash
run: cmake --build . --target cov_data
- name: Report code coverage
uses: zgosalvez/github-actions-report-lcov@v1
with:
coverage-files: build/cov.info.cleaned
minimum-coverage: 70
artifact-name: code-coverage-report
github-token: ${{ secrets.GITHUB_TOKEN }}
working-directory: ${{github.workspace}}