-
Notifications
You must be signed in to change notification settings - Fork 2
68 lines (55 loc) · 1.6 KB
/
codecov.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: 'Code Coverage'
on:
pull_request:
push:
branches:
- 'main'
workflow_dispatch:
env:
ci: 1
defaults:
run:
shell: bash
working-directory: ot3-firmware
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
jobs:
generate-coverage:
name: 'Generate-Coverage'
runs-on: 'ubuntu-20.04'
timeout-minutes: 10
steps:
- name: Checkout ot3-firmware repo
uses: actions/checkout@v4
with:
path: ot3-firmware
- name: Checkout github actions directory
uses: actions/checkout@v4
with:
sparse-checkout: |
.github/actions
sparse-checkout-cone-mode: false
path: actions
- name: Setup main
uses: ./actions/.github/actions/main-setup
with:
cache-version: ${{ secrets.CACHE_VERSION }}
- name: Install LCOV
run: sudo apt install -y lcov
- name: Install lcov_cobertura module
run: pip install lcov_cobertura
- name: Configure
run: cmake --preset=host-gcc10 -DENABLE_COVERAGE=On -DCMAKE_BUILD_TYPE=Debug
- name: Run all tests
run: cmake --build --preset tests
- name: Generate coverage
run: cmake --build --preset tests --target lcov-geninfo
- name: Convert coverage to xml
run: lcov_cobertura build-host/lcov/data/capture/all_targets.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
files: ot3-firmware/coverage.xml
name: codecov-ot3-firmware
fail_ci_if_error: true