diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index cce0465fc..4c8e2e56f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,7 +8,6 @@ name: coverage env: COBERTURA_REPORT: cobertura.xml COVERALLS_REPORT: coveralls.json - JSON_REPORT: report.json JSON_SUMMARY: summary.json HTML_REPORT_DIR: html/ COVERAGE_ARTIFACT_NAME: coverage-report @@ -36,7 +35,7 @@ jobs: - name: Install gcovr run: | - python -m pip install gcovr==8.3 + python -m pip install git+https://github.com/gcovr/gcovr.git@3e5e4343658175fcf786092a06336e592ecb1ed0 - name: Print versions run: | @@ -87,50 +86,34 @@ jobs: cd build gcovr --root .. \ --verbose \ - --include "${GITHUB_WORKSPACE}/include/mimic++(_ext)?" \ - --filter "${GITHUB_WORKSPACE}/include/mimic++(_ext)?" \ + --include "${GITHUB_WORKSPACE}/include" \ + --filter "${GITHUB_WORKSPACE}/include" \ --exclude-lines-by-pattern "\s*(MIMICPP_ASSERT|assert|util::unreachable)\(" \ --exclude-unreachable-branches \ --exclude-function-lines \ --exclude-noncode-lines \ --exclude-throw-branches \ + --merge-lines \ --decisions \ --calls \ --keep \ --txt \ --cobertura ${{env.COBERTURA_REPORT}} --cobertura-pretty \ + --coveralls ${{env.COVERALLS_REPORT}} --coveralls-pretty \ --html-nested ${{env.HTML_REPORT_DIR}} --html-title "mimic++ Coverage Report" \ - --json-summary ${{env.JSON_SUMMARY}} --json-summary-pretty \ - --json ${{env.JSON_REPORT}} --json-pretty + --json-summary ${{env.JSON_SUMMARY}} --json-summary-pretty mv ${{env.COBERTURA_REPORT}} .. + mv ${{env.COVERALLS_REPORT}} .. mv ${{env.HTML_REPORT_DIR}} .. mv ${{env.JSON_SUMMARY}} .. - mv ${{env.JSON_REPORT}} .. - - # Gathering the coveralls.json in one go with all the other reports results in inconsistent reports. - # see: https://github.com/gcovr/gcovr/issues/1074 - - name: Create coveralls report - run: | - cd build - gcovr --root .. \ - --verbose \ - --include "${GITHUB_WORKSPACE}/include/mimic++(_ext)?" \ - --filter "${GITHUB_WORKSPACE}/include/mimic++(_ext)?" \ - --add-tracefile ../${{env.JSON_REPORT}} \ - --coveralls ${{env.COVERALLS_REPORT}} --coveralls-pretty - - mv ${{env.COVERALLS_REPORT}} .. - - - name: Find gcov-files - shell: bash - run: find . -type f -name "*.gcov" + # As of gcovr 8.4, these are *json.gz instead of *.gcov - name: Upload gcov coverage report artifacts uses: actions/upload-artifact@v4 with: name: gcov-files - path: "**/*.gcov" + path: "**/*.json.gz" if-no-files-found: error - name: Upload generated report artifacts @@ -140,7 +123,6 @@ jobs: path: | ${{env.COBERTURA_REPORT}} ${{env.COVERALLS_REPORT}} - ${{env.JSON_REPORT}} ${{env.JSON_SUMMARY}} ${{env.HTML_REPORT_DIR}} if-no-files-found: error