-
Notifications
You must be signed in to change notification settings - Fork 21
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
Fetch WC L-1 versions #2046
Fetch WC L-1 versions #2046
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #2046 +/- ##
===========================================
+ Coverage 58.0% 58.2% +0.2%
+ Complexity 4121 4119 -2
===========================================
Files 455 454 -1
Lines 17715 17701 -14
===========================================
+ Hits 10278 10297 +19
+ Misses 7437 7404 -33
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Why do we switch to WC L-1? IMHO, the opposite setup could be desired WC L-2, but WP L-1 - as that is what WC supports. |
We didn't do any switch. Actually, we increased from L-0 to L-1, if you check the old version it was fetching the latest WC version. In regards to the policies, I checked https://woogrowp2.wordpress.com/2023/07/31/l-1-policy/ but I didn't see any accepted answer yet with the final consensus, so I lean to keep it as it was until we decide. |
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.
Thanks for the changes, this is working as expected. I left a few comments but none of them are blocking.
I do agree with Tomek that we might as well bump this to WC L-2 even if we aren't testing every single combination.
.github/workflows/php-unit-tests.yml
Outdated
@@ -35,24 +35,42 @@ jobs: | |||
with: | |||
slug: wordpress | |||
|
|||
GetWCMatrix: |
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.
Same as comment https://github.com/woocommerce/automatewoo/pull/1527/files#r1286879075
Does it make sense to merge this as one job?
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.
Done ✅
.github/workflows/php-unit-tests.yml
Outdated
- php: 7.4 | ||
wp-version: ${{ needs.GetMatrix.outputs.latest-wp-version }} | ||
wp-version: ${{ needs.GetWPMatrix.outputs.latest-wp-version }} | ||
wc-version: ${{ needs.GetWCMatrix.outputs.previous-wc-version }} |
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.
In the interest of not testing all combinations (to save billing minutes), on other extensions we make this test do the oldest supported version of everything. So in that case wouldn't this need to be PHP 7.4, WP L-2, WC L-1.
Since this is the only test that uses an older version of WC I wouldn't be against changing this to WC L-2.
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.
I changed the matrix, now we follow the same as Automatewoo
.github/workflows/php-unit-tests.yml
Outdated
|
||
- if: matrix.wp-version == needs.GetMatrix.outputs.latest-wp-version && matrix.php == 8.0 | ||
- if: matrix.wp-version == needs.GetWPMatrix.outputs.latest-wp-version && matrix.php == 8.0 |
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.
We might as well add an additional check to make sure WC is at latest version to ensure the coverage report is only generated on one run. Right now it will still run only once but if we tweak the matrix later on then it would be easy to miss:
- if: matrix.wp-version == needs.GetWPMatrix.outputs.latest-wp-version && matrix.php == 8.0 | |
- if: matrix.wp-version == needs.GetWPMatrix.outputs.latest-wp-version && matrix.wc-version == needs.GetWCMatrix.outputs.latest-wc-version && matrix.php == 8.0 |
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 done as well, as we are now changing the matrix I check PHP 8.0 and WC latest
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.
The suggestion to check all three was in case we would test more combinations of WP as well. But not a big deal since as you mentioned it is cover how it is now.
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.
Thanks for the changes, they are working well.
The only minor comment I have left is that none of the combinations test WP L-1. Maybe for variety we could pass that to the PHP 8.1 test.
Changes proposed in this Pull Request:
This PR fetch WooCommerce L-1 versions for our tests using https://github.com/woocommerce/grow/tree/trunk/packages/github-actions/actions/get-plugin-releases
Detailed test instructions:
Verify the WC version is properly fetched and the test passing
https://github.com/woocommerce/google-listings-and-ads/actions/runs/5787000158/job/15682944873?pr=2046
Additional details:
Changelog entry