Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

Add PHP coverage checks #840

Closed
wants to merge 3 commits into from

Conversation

vbelolapotkov
Copy link

@vbelolapotkov vbelolapotkov commented Apr 28, 2025

Description

Add scripts for generating coverage reports and checking overall coverage.

For now I've excluded a few things:

  • views (templates)
  • legacy and deprecated code
  • php interfaces

How to test this PR

Testing scripts:

  1. Follow setup instructions in tests/README.md
  2. Run tests with coverage report
  3. Check overal coverage and html report locally.

Testing config:

  1. Review coverage config in phpunit.xml.dist
  2. Inspect excluded folders and files list.
  3. Check if anything else is missing or should not be in that list.

Product impact

  • Added changelog entry (or does not apply)
  • Will this PR affect WooCommerce Subscriptions? yes/no/tbc, add issue ref
  • Will this PR affect WooCommerce Payments? yes/no/tbc, add issue ref
  • Added deprecated functions, hooks or classes to the spreadsheet

@vbelolapotkov vbelolapotkov marked this pull request as ready for review April 29, 2025 10:14
Copy link
Member

@alefesouza alefesouza left a comment

Choose a reason for hiding this comment

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

Works as expected.

✅ Coverage file is generated.
npm run test:php-check-coverage shows the coverage percentage.

@vbelolapotkov
Copy link
Author

Closing as it's no longer relevant.
Context: peNgfG-7U-p2

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants