-
Notifications
You must be signed in to change notification settings - Fork 22
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
ci: enable codecov uploading again #384
Conversation
Sample app builds 📱Below you will find the list of the latest versions of the sample apps. It's recommended to always download the latest builds of the sample apps to accurately test the pull request.
|
Pull request title looks good 👍! If this pull request gets merged, it will not cause a new release of the software. Example: If this project's latest release version is All merged pull requests will eventually get deployed. But some types of pull requests will trigger a deployment (such as features and bug fixes) while some pull requests will wait to get deployed until a later time. This project uses a special format for pull requests titles. Expand this section to learn more (expand by clicking the ᐅ symbol on the left side of this sentence)...This project uses a special format for pull requests titles. Don't worry, it's easy! This pull request title should be in this format:
If your pull request introduces breaking changes to the code, use this format:
where
Examples:
Need more examples? Want to learn more about this format? Check out the official docs. Note: If your pull request does multiple things such as adding a feature and makes changes to the CI server and fixes some bugs then you might want to consider splitting this pull request up into multiple smaller pull requests. |
Codecov Report
@@ Coverage Diff @@
## main #384 +/- ##
==========================================
+ Coverage 56.11% 59.08% +2.97%
==========================================
Files 103 119 +16
Lines 1153 4556 +3403
==========================================
+ Hits 647 2692 +2045
- Misses 506 1864 +1358
|
# https://about.codecov.io/blog/pre-converting-xcresult-files-for-codecov-using-xcresultparser/ | ||
- name: Generate code coverage report from .xcresult/ that can be converted to codecov format | ||
run: | | ||
brew tap a7ex/homebrew-formulae && brew install xcresultparser | ||
xcresultparser --output-format cobertura "Customer.io-Package.xcresult" > ".build/coverage.xml" |
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.
This is the most important part of this PR. The previous tool that we were using to convert xcresult
file into a format that codecov understands was no longer working. So, I went out and tried to find a popular tool that we can depend on into the future.
Because codecov made a blog post that included this tool, it made me feel confident in this tool.
- name: Upload code coverage report | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_UPLOAD_TOKEN }} # not required for public repos, but sometimes uploads fail without it so include it anyway | ||
files: .build/coverage.xml | ||
fail_ci_if_error: true # fail if upload fails so we can catch it and fix it right away. | ||
verbose: true |
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.
Updated action to latest v3 and modified the file path to an up-to-date one.
- "Tests" # ignore code coverage of Test/ files | ||
- "**/*.generated.swift" # Ignore code coverage of generated files. |
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.
Added some ignore blocks to make our test coverage data more accurate. These files are not relevant to test coverage so we should ignore them.
Get test coverage working again on this repo after it broke a while back.