-
Notifications
You must be signed in to change notification settings - Fork 4
38 lines (36 loc) · 1.23 KB
/
tests-with-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
name: Tests Linux with coverage
on: [push]
jobs:
build:
name: build an tests with coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y python3-pip lcov g++
pip install --upgrade meson ninja numpy meson-python>=0.14.0 build wheel ddt requests
- name: Configure with meson
run: meson -Db_coverage=true -Dwith_tests=true . build
- name: Build (meson)
run: ninja -C build
- name: Run tests (meson)
run: ninja test -C build
- name: Generate Coverage report
run: |
lcov --capture --directory . --output-file coverage.info
lcov --remove coverage.info '/usr/*' --output-file coverage.info
lcov --remove coverage.info '*/catch.hpp' --output-file coverage.info
lcov --list coverage.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.info
flags: unittests
name: codecov-cdfpp
yml: ./codecov.yml
fail_ci_if_error: true