magmamoose/Brimyr
Patch-coverage gate: run tests with coverage and gate on the coverage of the lines a PR changed.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| checkout | Run actions/checkout first. Patch coverage needs full history (fetch-depth 0). | no | true |
| fetch_depth | Checkout fetch-depth. MUST be 0 for patch coverage (merge-base). | no | 0 |
| mode | auto | pr (patch-coverage gate) | baseline (trend only, no gate). | no | auto |
| threshold | Patch-coverage threshold (%) that blocks below it. | no | 80 |
| base_ref | Override the base ref/SHA (default: PR base SHA from the event). | no | "" |
| head_ref | Override the head ref/SHA (default: PR head SHA, else github.sha). | no | "" |
| strip_prefix | Comma-separated path prefixes to strip from coverage paths before matching. | no | "" |
| ecosystem | Force ecosystem(s): comma-separated python|javascript|dotnet (default: auto-detect). | no | "" |
| test_command | Override the detected test command (a shell command string). | no | "" |
| coverage_file | Escape hatch: ingest pre-made coverage file(s) "path[:format]", comma-separated, instead of running tests. | no | "" |
| sonar_url | SonarQube host URL. Set to run a non-blocking sonar-scanner pass. | no | "" |
| sonar_token | SonarQube token (pass a secret). Used only if sonar_url is set. | no | "" |
| sonar_project_key | Sonar project key. | no | "" |
| sonar_organization | Sonar organization (SonarCloud). | no | "" |
| emit_json_artifact | Upload the patch-coverage JSON summary as a build artifact. | no | true |
| json_artifact_name | Artifact name for the patch-coverage JSON summary. | no | brimyr-coverage |
| python_version | Python version used to run the brimyr CLI. | no | 3.12 |
Outputs
| name | description |
|---|---|
| mode | Resolved run mode (pr | baseline). |
| gate_result | pass | fail | error. |
| patch_coverage | Patch coverage percentage (covered changed executable lines / total). |
| covered_lines | Covered changed executable lines. |
| total_lines | Total changed executable lines (the patch-coverage denominator). |