-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (40 loc) · 1.19 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
44
45
46
47
48
49
name: Code Coverage
on: [push]
env:
BUILD_TYPE: Debug
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get -yq update
sudo apt-get install -yq cmake lcov
gcc --version
- name: Configure
shell: bash
run: |
cmake -B ${{github.workspace}}/build \
-DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} \
-DCODE_COVERAGE=1
- name: Build
shell: bash
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
- name: Run Test
shell: bash
run: |
pip3 install -r tools/mock_server/requirements.txt
nohup python3 tools/mock_server/server.py &
sleep 1
cd build
ctest -V
- name: Generage Code Coverage Report
shell: bash
run: cmake --build ${{github.workspace}}/build --target test_coverage
- name: Upload Report to Codecov
uses: codecov/codecov-action@v2
with:
files: ${{github.workspace}}/build/test_coverage.info
fail_ci_if_error: true
functionalities: fix