Skip to content

[skip changelog] Move upload of coverage data to dedicated job in test workflow #1915

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 2 commits into from
Oct 11, 2022
Merged

[skip changelog] Move upload of coverage data to dedicated job in test workflow #1915

merged 2 commits into from
Oct 11, 2022

Conversation

per1234
Copy link
Contributor

@per1234 per1234 commented Oct 11, 2022

Please check if the PR fulfills these requirements

See how to contribute

  • The PR has no duplicates (please search among the Pull Requests
    before creating one)
  • The PR follows
    our contributing guidelines
  • [N/A] Tests for the changes have been added (for bug fixes / features)
  • [N/A] Docs have been added / updated (for bug fixes / features)
  • [N/A] UPGRADING.md has been updated with a migration guide (for breaking changes)

What kind of change does this PR introduce?

Infrastructure enhancement

What is the current behavior?

The code coverage data generated by running the unit tests in the "Test Go" GitHub Actions workflow is uploaded to Codecov.

This upload is prone to occasional transient failures. With the previous workflow configuration this caused a failure of the Linux test run job. Contributors would need to review the logs to understand that these failures were not caused by a test failing.

The failure also causes the ongoing jobs that run the tests on other operating systems to be immediately canceled, meaning their full test results are not available. The entire test suite must be reran just to attempt the upload again.

What is the new behavior?

Move the coverage data upload to a dedicated workflow job.

This makes it faster and easier for contributors to interpret the cause of a test failure.

It also allows the test suite to complete for all operating systems, making their results immediately available to the contributor even when the coverage data upload fails.

The coverage upload job can be reran, making recovery from a transient failure more efficient.

Does this PR introduce a breaking change, and is titled accordingly?

No breaking change

The code coverage data generated by running the unit tests in the "Test Go" GitHub Actions workflow is uploaded to
Codecov.

This upload is prone to occasional transient failures. With the previous workflow configuration this caused a failure of
the Linux test run job. Contributors would need to review the logs to understand that these failures were not caused by
a test failing. The failure also causes the ongoing jobs that run the tests on other operating systems to be immediately
canceled, meaning their full test results are not available. The entire test suite must be reran just to attempt the
upload again.

Moving the upload to a dedicated workflow job makes it faster and easier for contributors to interpret the cause of a
test failure. It also allows the test suite to complete for all operating systems, making their results immediately
available to the contributor even when the coverage data upload fails. The coverage upload job can be reran, making
recovery from a transient failure more efficient.
The code coverage data generated by running the unit tests in the "Test Go" GitHub Actions workflow is uploaded to
Codecov. Arduino CLI's unit tests are split into two collections: those covering the modernized part of the codebase,
and those covering the "legacy" code inherited from arduino-builder. A separate code coverage data file is produced for
each of these collections.

The `codecov/codecov-action` GitHub Actions action is used to perform this upload. Previously, a separate step was used
for the upload of each of the code coverage files. The action provides the capability to specify multiple files for
upload in a comma-separated list. This approach will make the workflow more efficient and reliable.
@per1234 per1234 added type: enhancement Proposed improvement topic: infrastructure Related to project infrastructure labels Oct 11, 2022
@per1234 per1234 self-assigned this Oct 11, 2022
@per1234 per1234 merged commit 08d746d into arduino:master Oct 11, 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.

3 participants