Skip to content

Commit

Permalink
ci: unit_tests: collect coverage
Browse files Browse the repository at this point in the history
Install both gcovr and ninja from pypi, so a single tool (pip) is used.

Signed-off-by: Marcin Niestroj <[email protected]>
  • Loading branch information
mniestroj committed Sep 26, 2024
1 parent af477f3 commit 78ebb36
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions .github/workflows/lint_build_unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ jobs:
with:
submodules: 'recursive'

- name: Install ninja
- name: Install gcovr and ninja
run: |
sudo apt install -y ninja-build
pip install gcovr ninja
- name: Run unit tests
run: |
Expand All @@ -59,6 +59,22 @@ jobs:
--output-on-failure \
--timeout 2
- name: Coverage
run: |
gcovr \
--gcov-ignore-parse-errors=negative_hits.warn_once_per_file \
--merge-mode-functions=separate \
--json coverage.json \
build
- name: Upload test coverage artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: unit-test-coverage
path: |
coverage.json
linux_build:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 78ebb36

Please sign in to comment.