diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 79ba01d..3a17a66 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -23,4 +23,22 @@ jobs: - name: building and testing run: | ctest --build-and-test - bash <(curl -s https://codecov.io/bash) + - name: Code Coverage Report + uses: irongut/CodeCoverageSummary@v1.3.0 + with: + filename: coverage/**/summary_cobertura.xml + badge: true + fail_below_min: true + format: markdown + hide_branch_rate: false + hide_complexity: true + indicators: true + output: both + thresholds: '60 80' + + - name: Add Coverage PR Comment + uses: marocchino/sticky-pull-request-comment@v2 + if: github.event_name == 'pull_request' + with: + recreate: true + path: code-coverage-results.md diff --git a/cmake/CodeCoverage.cmake b/cmake/CodeCoverage.cmake index 5c78fc6..e4aaa84 100644 --- a/cmake/CodeCoverage.cmake +++ b/cmake/CodeCoverage.cmake @@ -135,7 +135,7 @@ function(setup_target_for_coverage_gcovr_html) --json-summary --json-summary-pretty --html-theme - green) + github.dark-green) set(GCOVR_HTML_CMD ${GCOVR_PATH} ${GCOVR_EXTRA_FLAGS} @@ -145,6 +145,10 @@ function(setup_target_for_coverage_gcovr_html) --json-summary ${Coverage_NAME}/summary.json --json-summary-pretty + --cobertura-pretty + ${Coverage_NAME}/summary_cobertura.xml + --cobertura + --decisions -r ${BASEDIR} ${GCOVR_ADDITIONAL_ARGS}