Release 2026.3.0 #947
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Coverage | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| branches: [ '**' ] | |
| jobs: | |
| coverage-linux: | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| env: | |
| SCCACHE_GHA_ENABLED: "true" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Run sccache-cache | |
| uses: mozilla-actions/sccache-action@v0.0.9 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ninja-build uuid-dev | |
| pip install gcovr | |
| gcovr --version | |
| - name: Configure | |
| run: | | |
| mkdir -p build && cd build | |
| cmake .. -DCMAKE_BUILD_TYPE=Debug \ | |
| -DCMAKE_CXX_FLAGS=" -fprofile-arcs -ftest-coverage " \ | |
| -DCMAKE_EXE_LINKER_FLAGS=" --coverage -lgcov " \ | |
| -DMAPGET_ENABLE_TESTING=YES \ | |
| -DMAPGET_WITH_WHEEL=True \ | |
| -DMAPGET_WITH_SERVICE=True \ | |
| -DMAPGET_WITH_HTTPLIB=True \ | |
| -DWITH_COVERAGE=YES \ | |
| -GNinja | |
| - name: Build | |
| run: | | |
| cd build | |
| cmake --build . | |
| - name: Run Test | |
| run: | | |
| cd build | |
| ctest --verbose --no-tests=error | |
| - name: Run Gcovr | |
| run: | | |
| mkdir coverage | |
| gcovr --html-details coverage/coverage.html \ | |
| --filter libs/ \ | |
| --gcov-ignore-parse-errors=negative_hits.warn_once_per_file | |
| gcovr --cobertura coverage.xml \ | |
| --html coverage.html \ | |
| --filter libs/ \ | |
| --gcov-ignore-parse-errors=negative_hits.warn_once_per_file | |
| - name: Publish Coverage HTML | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Test Coverage | |
| path: coverage | |
| # - name: Upload coverage HTML to Gist | |
| # # Upload only for main branch | |
| # if: > | |
| # github.event_name == 'workflow_run' && github.event.workflow_run.head_branch == 'main' || | |
| # github.event_name != 'workflow_run' && github.ref == 'refs/heads/main' | |
| # uses: andymckay/append-gist-action@1fbfbbce708a39bd45846f0955ed5521f2099c6d | |
| # with: | |
| # token: ${{ secrets.GIST_TOKEN }} | |
| # gistURL: https://gist.githubusercontent.com/johannes-wolf/61e57af50757b03e0c7cd119ec2d2f4b | |
| # file: coverage.html | |
| - name: Code Coverage Report | |
| uses: irongut/CodeCoverageSummary@v1.3.0 | |
| with: | |
| filename: coverage.xml | |
| badge: false | |
| fail_below_min: true | |
| format: markdown | |
| hide_branch_rate: false | |
| hide_complexity: true | |
| indicators: true | |
| output: both | |
| thresholds: '50 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 |