Skip to content

Commit

Permalink
Workaround for test coverage bug
Browse files Browse the repository at this point in the history
  • Loading branch information
oxisto committed Nov 28, 2024
1 parent e994814 commit 80561a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,19 @@ jobs:
id: build
env:
VERSION: ${{ env.version }}
- name: Prepare report.xml for Codecov
run: |
# this is needed because codecov incorrectly reports lines that have no coverage information (good or bad) as a miss
# See https://github.com/codecov/feedback/issues/564 and https://github.com/Kotlin/kotlinx-kover/issues/699.
# Actually these lines should just not exist in the coverage XML file, since they are only structural elements, such
# as brackets.
cat cpg-all/build/reports/kover/report.xml | grep -v 'mi="0" ci="0" mb="0" cb="0"' > cpg-all/build/reports/kover/report-codecov.xml
rm cpg-all/build/reports/kover/report.xml
- name: Upload Code Coverage
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
files: ./cpg-all/build/reports/kover/report.xml
files: ./cpg-all/build/reports/kover/report-codecov.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
- name: Prepare test and coverage reports
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,8 +520,8 @@ class Application : Callable<Int> {

if (!noDefaultPasses) {
translationConfiguration.defaultPasses()
// translationConfiguration.registerPass<ControlDependenceGraphPass>()
// translationConfiguration.registerPass<ProgramDependenceGraphPass>()
translationConfiguration.registerPass<ControlDependenceGraphPass>()
translationConfiguration.registerPass<ProgramDependenceGraphPass>()
}
if (customPasses != "DEFAULT") {
val pieces = customPasses.split(",")
Expand Down

0 comments on commit 80561a3

Please sign in to comment.