diff --git a/.github/workflows/lint_build_unit_test.yml b/.github/workflows/lint_build_unit_test.yml index 2b3af32b4..e31f92d50 100644 --- a/.github/workflows/lint_build_unit_test.yml +++ b/.github/workflows/lint_build_unit_test.yml @@ -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: | @@ -59,6 +59,21 @@ 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 + if: always() + uses: actions/upload-artifact@v4 + with: + name: unit-test-coverage + path: coverage.json + linux_build: runs-on: ubuntu-latest steps: