Skip to content

Bump codecov/codecov-action to v2 #18

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

Merged
merged 3 commits into from
Jan 10, 2022
Merged

Bump codecov/codecov-action to v2 #18

merged 3 commits into from
Jan 10, 2022

Conversation

per1234
Copy link
Collaborator

@per1234 per1234 commented Jan 6, 2022

The codecov/codecov-action GitHub Actions action is used in the "libraries/report-size-deltas workflow" workflow to upload code coverage data to Codecov.

The previously used codecov/codecov-action@v1 version is deprecated and will cease working in less than a month:
https://github.com/codecov/codecov-action#%EF%B8%8F--deprecration-of-v1

The use of the v2 major version ref will cause the workflow to use a stable version of the action, while also benefiting from ongoing development to the action up until such time as a new major release of an action is made. At that time we would need to evaluate whether any changes to the workflow are required by the breaking change that triggered the major release before manually updating the major ref (e.g., uses: codecov/codecov-action@v3).


The v1 version of the codecov/codecov-action action automatically generated the data file via coverage xml, but the
latest v2 does not, which causes it to fail:

[2022-01-05T09:53:02.481Z] ['info'] Searching for coverage files...
[2022-01-05T09:53:02.501Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files!
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v2.1.0/dist/codecov' failed with exit code 255

It also seems better to have full control over the process by doing it explicitly rather than relying on an action which
is used primarily to handle the data upload to Codecov.

This also more closely aligns the workflow with the one for the arduino/compile-sketches action.


Supersedes #17

The "libraries/report-size-deltas workflow" GitHub Actions workflow prints a code coverage report to the workflow run
logs.

Previously this was done in the same step used to run the tests. Both the test run output and the coverage report will
be easier to read with a dedicated section of the logs for each, which each workflow step has. This will also make it
easier to interpret any workflow failures since the failed step would only be concerned with a single specific
operation.
The v1 version of the `codecov/codecov-action` action automatically generated the data file via `coverage xml`, but the
latest v2 does not, which causes it to fail:

```
[2022-01-05T09:53:02.481Z] ['info'] Searching for coverage files...
[2022-01-05T09:53:02.501Z] ['error'] There was an error running the uploader: Error while cleaning paths. No paths matched existing files!
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v2.1.0/dist/codecov' failed with exit code 255
```

It also seems better to have full control over the process by doing it explicitly rather than relying on an action which
is used primarily to handle the data upload to Codecov.
The `codecov/codecov-action` GitHub Actions action is used in the "libraries/report-size-deltas workflow" workflow to
upload code coverage data to Codecov.

The previously used `codecov/codecov-action@v1` version is deprecated and will cease working in less than a month:
https://github.com/codecov/codecov-action#%EF%B8%8F--deprecration-of-v1

The use of the `v2` major version ref will cause the workflow to use a stable version of the action, while also
benefiting from ongoing development to the action up until such time as a new major release of an action is made. At
that time we would need to evaluate whether any changes to the workflow are required by the breaking change that
triggered the major release before manually updating the major ref (e.g., uses: `codecov/codecov-action@v3`).
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Jan 6, 2022
@per1234 per1234 self-assigned this Jan 6, 2022
@per1234 per1234 merged commit 1aebe86 into arduino:main Jan 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: infrastructure Related to project infrastructure type: enhancement Proposed improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants