Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise coverage report workflow to generate the report too #33

Merged
merged 1 commit into from
Mar 5, 2024

Conversation

KevinBrowne
Copy link
Member

The attempt to upload the code coverage report in a separate workflow has been an exercise in frustration.

The initial plan was to generate the report in the test job of the CI workflow, save it as an artefact, then download the artefact in the coverage report workflow and upload it to Code Climate there.

Unfortunately, for this to work the coverage report workflow needs to check out the revision of the repo on which the report was generated. Code Climate must associate the coverage report with the revision that generated so that it can calculate the coverage diffs for, and the only way in which the Code Climate action can get this is from the currently checked-out revision.

Frankly, if we're going to have to check the revision out, we may as well just generate the report in this workflow too, and not mess around with artefacts. The tests don't take long to run, anyway.

The attempt to upload the code coverage report in a separate workflow
has been an exercise in frustration.

The initial plan was to generate the report in the test job of the CI
workflow, save it as an artefact, then download the artefact in the
coverage report workflow and upload it to Code Climate there.

Unfortunately, for this to work the coverage report workflow needs to
check out the revision of the repo on which the report was
generated. Code Climate must associate the coverage report with the
revision that generated so that it can calculate the coverage diffs
for, and the only way in which the Code Climate action can get this is
from the currently checked-out revision.

Frankly, if we're going to have to check the revision out, we may as
well just generate the report in this workflow too, and not mess
around with artefacts. The tests don't take long to run, anyway.
Copy link

codeclimate bot commented Mar 5, 2024

Code Climate has analyzed commit 9387b34 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (95% is the threshold).

This pull request will bring the total coverage in the repository to 95.6% (0.0% change).

View more on Code Climate.

@KevinBrowne KevinBrowne merged commit 04982c8 into master Mar 5, 2024
10 checks passed
@KevinBrowne KevinBrowne deleted the fix_cc_upload_workflow branch March 5, 2024 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant