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

ci: enable codecov uploading again #384

Merged
merged 9 commits into from
Sep 19, 2023
Merged

ci: enable codecov uploading again #384

merged 9 commits into from
Sep 19, 2023

Conversation

levibostian
Copy link
Contributor

@levibostian levibostian commented Sep 15, 2023

Get test coverage working again on this repo after it broke a while back.

@github-actions
Copy link

github-actions bot commented Sep 15, 2023

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.


  • CocoaPods-FCM: levi/codecov (1695149683)
  • APN-UIKit: levi/codecov (1695149637)

@github-actions
Copy link

github-actions bot commented Sep 15, 2023

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 1.0.0. If this pull request gets merged in, the next release of this project will be 1.0.0. This pull request is not a breaking change.

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:

<type>: short description of change being made

If your pull request introduces breaking changes to the code, use this format:

<type>!: short description of breaking change

where <type> is one of the following:

  • feat: - A feature is being added or modified by this pull request. Use this if you made any changes to any of the features of the project.

  • fix: - A bug is being fixed by this pull request. Use this if you made any fixes to bugs in the project.

  • docs: - This pull request is making documentation changes, only.

  • refactor: - A change was made that doesn't fix a bug or add a feature.

  • test: - Adds missing tests or fixes broken tests.

  • style: - Changes that do not effect the code (whitespace, linting, formatting, semi-colons, etc)

  • perf: - Changes improve performance of the code.

  • build: - Changes to the build system (maven, npm, gulp, etc)

  • ci: - Changes to the CI build system (Travis, GitHub Actions, Circle, etc)

  • chore: - Other changes to project that don't modify source code or test files.

  • revert: - Reverts a previous commit that was made.

Examples:

feat: edit profile photo
refactor!: remove deprecated v1 endpoints
build: update npm dependencies
style: run formatter 

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
Copy link

codecov bot commented Sep 15, 2023

Codecov Report

Merging #384 (e3d933a) into main (9dad7f3) will increase coverage by 2.97%.
Report is 119 commits behind head on main.
The diff coverage is 32.87%.

@@            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     
Files Changed Coverage Δ
...s/Common/Background Queue/ApiSyncQueueRunner.swift 86.11% <ø> (+2.77%) ⬆️
...ces/Common/Background Queue/Type/QueueStatus.swift 100.00% <ø> (ø)
...urces/Common/Background Queue/Type/QueueTask.swift 100.00% <ø> (ø)
...mmon/Background Queue/Type/QueueTaskMetadata.swift 100.00% <ø> (ø)
Sources/Common/Extensions/ResultExtensions.swift 100.00% <ø> (ø)
...rces/Common/Extensions/UserDefaultExtensions.swift 100.00% <ø> (ø)
Sources/Common/Service/HttpRequestRunner.swift 0.00% <ø> (ø)
Sources/Common/Service/HttpRetryPolicy.swift 100.00% <ø> (ø)
Sources/Common/Util/DeviceMetricsGrabber.swift 100.00% <ø> (ø)
Sources/Common/Util/SingleScheduleTimer.swift 66.66% <ø> (ø)
... and 81 more

... and 45 files with indirect coverage changes

@github-actions
Copy link

github-actions bot commented Sep 15, 2023

Warnings
⚠️

Swift Package Manager files (Package.) were modified but Cocoapods files (.podspec) files were not. This is error-prone when updating dependencies in one service but not the other. Double-check that you updated all of the correct files.

Generated by 🚫 dangerJS against e3d933a

Comment on lines +44 to +48
# 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"
Copy link
Contributor Author

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.

Comment on lines +50 to +56
- 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
Copy link
Contributor Author

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.

@levibostian levibostian requested a review from a team September 15, 2023 20:05
Package.swift Outdated Show resolved Hide resolved
Comment on lines +21 to +23
- "Tests" # ignore code coverage of Test/ files
- "**/*.generated.swift" # Ignore code coverage of generated files.
Copy link
Contributor Author

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.

@levibostian levibostian marked this pull request as ready for review September 15, 2023 20:07
@levibostian levibostian merged commit 0ab6e44 into main Sep 19, 2023
10 checks passed
@levibostian levibostian deleted the levi/codecov branch September 19, 2023 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants