Ubuntu 24.04 #25
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: Makefile CI | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| defaults: | |
| run: | |
| shell: bash | |
| container: | |
| image: kcov/kcov:latest | |
| steps: | |
| - uses: luizm/action-sh-checker@master | |
| - name: Install make | |
| run: apt update && apt install -y make git shellcheck xmlstarlet \ | |
| build-essential | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Build & Test | |
| run: make all | |
| - name: Produce the coverage report | |
| uses: insightsengineering/coverage-action@v3 | |
| with: | |
| # Path to the Cobertura XML report. | |
| path: test-reports/**/cobertura.xml | |
| # Minimum total coverage, if you want to the | |
| # workflow to enforce it as a standard. | |
| # This has no effect if the `fail` arg is set to `false`. | |
| threshold: 80 | |
| # Fail the workflow if the minimum code coverage | |
| # reuqirements are not satisfied. | |
| fail: true | |
| # Publish the rendered output as a PR comment | |
| publish: true | |
| # Create a coverage diff report. | |
| diff: true | |
| # Branch to diff against. | |
| # Compare the current coverage to the coverage | |
| # determined on this branch. | |
| diff-branch: main | |
| # This is where the coverage reports for the | |
| # `diff-branch` are stored. | |
| # Branch is created if it doesn't already exist'. | |
| diff-storage: _xml_coverage_reports | |
| # A custom title that can be added to the code | |
| # coverage summary in the PR comment. | |
| coverage-summary-title: "Code Coverage Summary" | |
| # Failure modes for coverage regression detection: | |
| # Fail if any changed file has more uncovered lines (pycobertura exit code 2) | |
| uncovered-statements-increase-failure: false | |
| # Fail if new uncovered statements are introduced despite overall improvement (pycobertura exit code 3) | |
| new-uncovered-statements-failure: false | |
| # Fail if the overall coverage percentage decreases (more forgiving approach) | |
| coverage-rate-reduction-failure: true | |