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

Upload coverage report for JS unit tests to codecov #2238

Merged
merged 2 commits into from
Feb 6, 2024

Conversation

mikkamp
Copy link
Contributor

@mikkamp mikkamp commented Feb 5, 2024

Changes proposed in this Pull Request:

When running the unit tests for JS, coverage reports are already being generated in various formats. This PR uploads the clover format to codecov.io so they can be included in the coverage report comment.

The coverage comment is currently only showing the status for PHP coverage, since there is no base to compare with yet for the JS coverage reports. Over time we'll have to monitor how accurate this is, since JS / PHP coverage reports are run conditionally depending on which files are changed. So not every PR / head commit has both to compare the differences.

Closes #864

Detailed test instructions:

  1. Confirm that the JS code coverage results are available: https://app.codecov.io/github/woocommerce/google-listings-and-ads/pull/2238/tree/js/src
  2. Confirm that the PHP code coverage results are available: https://app.codecov.io/github/woocommerce/google-listings-and-ads/pull/2238/tree/src

Changelog entry

  • Dev - Upload coverage report for JS unit tests to codecov.

@mikkamp mikkamp self-assigned this Feb 5, 2024
@github-actions github-actions bot added the changelog: dev Developer-facing only change. label Feb 5, 2024
Copy link

codecov bot commented Feb 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (876e3fe) 60.1% compared to head (03853e1) 60.1%.
Report is 3 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             develop   #2238   +/-   ##
=========================================
  Coverage       60.1%   60.1%           
  Complexity      4141    4141           
=========================================
  Files            454     454           
  Lines          17586   17586           
=========================================
  Hits           10572   10572           
  Misses          7014    7014           
Flag Coverage Δ
php-unit-tests 60.1% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@mikkamp mikkamp marked this pull request as ready for review February 5, 2024 15:27
@mikkamp mikkamp requested a review from a team February 5, 2024 15:28
Copy link
Contributor

@puntope puntope left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @mikkamp LGTM

@mikkamp mikkamp merged commit 9685f30 into develop Feb 6, 2024
11 checks passed
@mikkamp mikkamp deleted the dev/js-upload-coverage-report branch February 6, 2024 09:01
@tomalec tomalec mentioned this pull request Feb 6, 2024
21 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: dev Developer-facing only change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add test coverage report
2 participants