Repository navigation
Report action.yml line coverage to Codecov - #22
Merged
Merged
Conversation
Replay action.yml's bash steps under kcov across the default, JUnit, line-count and exclude-glob scenarios, then upload the merged Cobertura report with actions/upload-code-coverage. kcov v43 is built from source (ubuntu-latest no longer packages it) and cached per runner image.
Code Quality is only available on Team and Enterprise plans, so it is not available for this repository.
GitHub parsed the literal expression opener inside the embedded Python as an expression. Test for the closing-brace pair instead.
Disable Codecov's file search so it does not also pick up kcov's per-scenario reports under coverage/kcov.
The key ended in a trailing dash with no OS component. Read the release from /etc/os-release in a step instead.
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
main added a working-directory input, which the replay did not set, so the step failed on an unbound variable. Set it for every scenario and add relative, absolute and nonexistent cases to mirror the smoke tests.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
.github/workflows/coverage.yaml, which reports how much of the bash inaction.ymlthe smoke-test scenarios exercise, as line coverage in Codecov (PR comment with the percentage and per-file delta againstmain).How
The smoke tests run the action via
uses: ./, which nothing can trace. This job instead:run:blocks fromaction.yml, padded so line numbers match the file.action.yml.codecov/codecov-action@v5(same-repo PRs and pushes tomainonly, since fork PRs have no secrets).kcov v43 is built from source because Ubuntu 24.04 does not package it and the v42 release binary targets 22.04. The install prefix is cached per kcov version and runner image.
GitHub Code Quality was the first target but is only available on Team and Enterprise plans.
Before merging
CODECOV_TOKENrepository secret. Until then the upload step fails (fail_ci_if_error: true).Tested
Run locally in
ubuntu:24.04containers (workflowrun:blocks, cache-miss and cache-hit paths): 18 of 20 lines covered. Lines 51-52 (checksum-mismatch branch) are not exercised by any scenario. Theactions/cacheand Codecov upload steps only run on GitHub. Not added to the required checks.