Skip to content

Commit

Permalink
filtering out dtgen related files in code coverage report (#1406)
Browse files Browse the repository at this point in the history
* add codecov change

* comment it out to see whether it is true

* add pycoverage file back

* disable pycoverage and verbose

* try rm folder codecov yml

* add weird flag and recover yml

* add ignore path

* final change

* ignore path

* delete lcov

* add ignore under codecov

* not ignore deps

* clean comment
  • Loading branch information
Bob-Chen222 authored Jun 4, 2024
1 parent f93e262 commit 89cbe93
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/per-lib-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,17 +112,16 @@ jobs:
run: |
echo "gitwork: $GITHUB_WORKSPACE"
lcov --capture --directory . --output-file main_coverage.info
lcov --extract main_coverage.info "$GITHUB_WORKSPACE/lib/*" --output-file main_coverage_e.info
lcov --remove main_coverage_e.info "$GITHUB_WORKSPACE/lib/*.dtg.h" "$GITHUB_WORKSPACE/lib/*.dtg.cc" --output-file main_coverage_e_f.info
lcov --list main_coverage_e_f.info
lcov --extract main_coverage.info "$GITHUB_WORKSPACE/lib/*" --output-file main_coverage.info
lcov --remove main_coverage.info "$GITHUB_WORKSPACE/lib/*.dtg.h" "$GITHUB_WORKSPACE/lib/*.dtg.cc" --output-file main_coverage.info
lcov --list main_coverage.info
- name: Upload code coverage
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: main_coverage_e_f.info
file: main_coverage.info
flags: unittests
plugin: pycoverage #hope this will disable gcov
name: codecov-umbrella
fail_ci_if_error: false
verbose: true
7 changes: 6 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ codecov:
notify:
require_ci_to_pass: false

ignore:
- "**/*.dtg.h"
- "**/*.dtg.cc"


coverage:
status:
project:
Expand All @@ -14,4 +19,4 @@ coverage:
comment:
layout: "header, diff, flags, files"
behavior: default
require_changes: no
require_changes: no

0 comments on commit 89cbe93

Please sign in to comment.