Closed ajzkk closed 1 year ago
The code coverage workflow works for now but it will not work in the future when we begin testing files containing Wordpress and WooCommerce's core functions like add_action
and others.
We did a few tweaks to setup for Magento unit test workflow due to similar reasons. Running the unit test with just plugin code didn't work because it didn't found the core Magento classes. We solved it by adding packages that installs Mangeto code while running Github action to test. Setting up unit test in WP is a bit more complicated than Magento.
For reference:
The code coverage workflow works for now but it will not work in the future when we begin testing files containing Wordpress and WooCommerce's core functions like
add_action
and others.We did a few tweaks to setup for Magento unit test workflow due to similar reasons. Running the unit test with just plugin code didn't work because it didn't found the core Magento classes. We solved it by adding packages that installs Mangeto code while running Github action to test. Setting up unit test in WP is a bit more complicated than Magento.
For reference:
Yes, I am aware of that and this ticket is just for integration with sonarcloud. We can have new ticket for proper unit test.
It's alright. Moving forward, lets start integrating with Sonarcloud only if we have proper unit test setup first.
Kudos, SonarCloud Quality Gate passed!
0 Bugs
0 Vulnerabilities
0 Security Hotspots
0 Code Smells
No Coverage information
0.0% Duplication
1. Objective
Code Coverage Integration with Sonarcloud
ENGA3-431
2. Description of change
Update pipeline to generate code coverage and sent report to sonarcloud
3. Quality assurance
Report link (3% after merge)
4. Impact of the change
N/A
5. Priority of change
Normal
6. Additional Notes
N/A