-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 1.71 KB
/
coverage.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
name: Coverage
on:
# Triggers the workflow on push or pull request events but only for the "master" branch
push:
branches:
- "master"
- "develop"
pull_request:
branches:
- "master"
- "develop"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: 🔧 Install GCC
uses: egor-tensin/[email protected]
with:
version: 13
- name: 🔧 Setup python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: pip
- name: ☁️ Install required packages
run: |
sudo apt-get install -y lcov
pip install -r requirements.txt
- name: 🐸 Create default Conan profile
run: conan profile detect
- name: ☁️ Get dependencies
run: conan install ${{ github.workspace }} --build=missing -s compiler.cppstd=20 -o testing=True -o coverage=True
- name: 🛠️ Configure CMake
run: cmake --preset conan-release
- name: 🔨 Build project
run: cmake --build --preset conan-release --parallel
- name: 🏃 Run test suite
run: ctest --preset conan-release
- name: 📊 Generate coverage reports with lcov
run: |
lcov --directory . --capture --output-file coverage.info --gcov-tool gcov-13
lcov --remove coverage.info '/usr/*' --remove coverage.info '**/.conan*' --remove coverage.info '**/test*' --remove coverage.info '**/test_package*' --output-file coverage.info
lcov --list coverage.info
- name: ☂️ Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}