-
Notifications
You must be signed in to change notification settings - Fork 143
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
Add WordPress and WooCommerce versions to the unit tests #2862
base: main
Are you sure you want to change the base?
Conversation
2903d35
to
475cd9e
Compare
.github/workflows/php-unit-tests.yml
Outdated
runs-on: ubuntu-latest | ||
env: | ||
WP_CORE_DIR: "/tmp/wordpress/src" | ||
WP_TESTS_DIR: "/tmp/wordpress/tests/phpunit" | ||
strategy: | ||
matrix: | ||
php: [7.4, 8.3] | ||
wp-version: [latest] | ||
wp-version: [6.6, 6.7] |
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 think for wp-version, we want to also test 5.7 as it's in our supported list.
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.
Where can I find the versions we support?
.github/workflows/php-unit-tests.yml
Outdated
runs-on: ubuntu-latest | ||
env: | ||
WP_CORE_DIR: "/tmp/wordpress/src" | ||
WP_TESTS_DIR: "/tmp/wordpress/tests/phpunit" | ||
strategy: | ||
matrix: | ||
php: [7.4, 8.3] | ||
wp-version: [latest] | ||
wp-version: [6.6, 6.7] |
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.
@halilozanakgul, would you be open to me adding an update which fetches the last two minor versions dynamically?
We can do this for WP & Woo by fetching the versions from these sources:
- WP: https://api.wordpress.org/core/version-check/1.7/
- Woo: https://api.github.com/repos/woocommerce/woocommerce/releases
@vahidkay-meta and I also talked about updating the PHP versions used so we cover the range between 7.4 and 8.3. I can include that in a commit (but we should rename the PR then to include changes to PHP, WP & Woo versions…).
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.
Do you think we can just use the latest
tag for this?
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.
No, we need to cover all of the supported versions.
You can find the supported versions in readme.txt file.
de89e96
to
cfacdf1
Compare
@halilozanakgul has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@halilozanakgul has updated the pull request. You must reimport the pull request before landing. |
1 similar comment
@halilozanakgul has updated the pull request. You must reimport the pull request before landing. |
34715c3
to
0c2f740
Compare
@halilozanakgul has updated the pull request. You must reimport the pull request before landing. |
0c2f740
to
24b4125
Compare
@halilozanakgul has updated the pull request. You must reimport the pull request before landing. |
24b4125
to
f4170f3
Compare
@halilozanakgul has updated the pull request. You must reimport the pull request before landing. |
Changes proposed in this Pull Request:
This PR adds WordPress and WooCommerce versions matrix in the unit tests so we can make sure new code works in older WordPress and WooCommerce versions too.
Detailed test instructions:
See Github's checks running multiple WC and WP versions.
Changelog entry
Dev - Added WordPress and WooCommerce versions to the tests