-
Notifications
You must be signed in to change notification settings - Fork 3
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
Fix codecov upload for codecov-action v5 #68
base: main
Are you sure you want to change the base?
Conversation
c7365e4
to
b0fdaba
Compare
b0fdaba
to
c3b05a2
Compare
|
Basically due to the image we are using is AL2 docker image, and codecov above v3 uses python11, you have to upload the report file, then download, before sending it to codecov using ubuntu-latest. |
Thanks. I was multitasking and tweaking this between other tests, appreciate the pointer. |
After looking at this, I'm not sure it's a better solution than what I had in #52. Looks like the codecov upload needs to be not on the CI container; and it's a lot simpler to just run unit tests and do coverage all by themselves on a non-CI runner than to wait for all JDK tests (including integ tests) to finish and do this upload/download dance.... So re-opened #52 to consider if we just want to do that one |
43e9d28
to
edc78e8
Compare
.github/workflows/CI.yml
Outdated
with: | ||
file: ./build/reports/jacoco/test/jacocoTestReport.xml | ||
name: coverage-report-linux |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since you are using multiple java means you need to change coverage-report-linux
to coverage-report-linux-${{ matrix.java }}
so that multiple runs will upload with different name on the artifact.
Same for download.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, previously the codecov was filtered to run only on one jdk.
But I don't think that's the problem. I'm guessing the change from file
to files
needs a different argument of some sort, just have been commuting and haven't looked into it yet
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, the problem is that I don't have the jacoco line in my build.gradle 🤦♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Warning: No files were found with the provided path: ./jacocoTestReport.xml. No artifacts will be uploaded.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or, I do, but since I have modules my path starting with ./build
doesn't work, I need ./modulepath/build
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WooHoo!
==> Running upload-coverage
./codecov upload-coverage --git-service github --sha 3a5a07f --branch dbwiddis:fix-ci-image --file ./coverage-reports/aos-client/build/reports/jacoco/test/jacocoTestReport.xml --file ./coverage-reports/remote-client/build/reports/jacoco/test/jacocoTestReport.xml --file ./coverage-reports/ddb-client/build/reports/jacoco/test/jacocoTestReport.xml --file ./coverage-reports/core/build/reports/jacoco/test/jacocoTestReport.xml --gcov-executable gcov
info - 2025-02-06 01:06:10,812 -- ci service found: github-actions
warning - 2025-02-06 01:06:10,816 -- No config file could be found. Ignoring config.
warning - 2025-02-06 01:06:10,834 -- xcrun is not installed or can't be found.
warning - 2025-02-06 01:06:10,836 -- No gcov data found.
warning - 2025-02-06 01:06:10,836 -- coverage.py is not installed or can't be found.
info - 2025-02-06 01:06:10,844 -- Found 4 coverage files to report
info - 2025-02-06 01:06:10,844 -- > /home/runner/work/opensearch-remote-metadata-sdk/opensearch-remote-metadata-sdk/coverage-reports/aos-client/build/reports/jacoco/test/jacocoTestReport.xml
info - 2025-02-06 01:06:10,845 -- > /home/runner/work/opensearch-remote-metadata-sdk/opensearch-remote-metadata-sdk/coverage-reports/remote-client/build/reports/jacoco/test/jacocoTestReport.xml
info - 2025-02-06 01:06:10,845 -- > /home/runner/work/opensearch-remote-metadata-sdk/opensearch-remote-metadata-sdk/coverage-reports/core/build/reports/jacoco/test/jacocoTestReport.xml
info - 2025-02-06 01:06:10,845 -- > /home/runner/work/opensearch-remote-metadata-sdk/opensearch-remote-metadata-sdk/coverage-reports/ddb-client/build/reports/jacoco/test/jacocoTestReport.xml
info - 2025-02-06 01:06:11,288 -- Your upload is now processing. When finished, results will be available at: https://app.codecov.io/github/opensearch-project/opensearch-remote-metadata-sdk/commit/3a5a07fc55262577fb328f5e0ff5f5b74079e934
info - 2025-02-06 01:06:11,513 -- Process Upload complete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
edc78e8
to
eb53096
Compare
Signed-off-by: Daniel Widdis <[email protected]>
eb53096
to
3a5a07f
Compare
Description
The action to upload code coverage changed parameter name in v5 from
file
tofiles
.Issues Resolved
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.