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

Add WordPress and WooCommerce versions to the unit tests #2862

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

halilozanakgul
Copy link
Contributor

@halilozanakgul halilozanakgul commented Jan 21, 2025

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

@halilozanakgul halilozanakgul force-pushed the add_wp_and_wc_versions_to_tests branch from 2903d35 to 475cd9e Compare January 21, 2025 18:15
@halilozanakgul halilozanakgul changed the title Add Wordpress and WooCommerce versions to the unit tests Add WordPress and WooCommerce versions to the unit tests Jan 21, 2025
@halilozanakgul halilozanakgul marked this pull request as ready for review January 21, 2025 19:43
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]
Copy link
Contributor

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.

Copy link
Contributor Author

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?

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]
Copy link
Collaborator

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:

@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…).

Copy link
Contributor Author

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?

Copy link
Contributor

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.

@halilozanakgul halilozanakgul force-pushed the add_wp_and_wc_versions_to_tests branch 2 times, most recently from de89e96 to cfacdf1 Compare January 27, 2025 11:59
@facebook-github-bot
Copy link
Contributor

@halilozanakgul has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@halilozanakgul has updated the pull request. You must reimport the pull request before landing.

1 similar comment
@facebook-github-bot
Copy link
Contributor

@halilozanakgul has updated the pull request. You must reimport the pull request before landing.

@halilozanakgul halilozanakgul force-pushed the add_wp_and_wc_versions_to_tests branch from 34715c3 to 0c2f740 Compare February 3, 2025 11:57
@facebook-github-bot
Copy link
Contributor

@halilozanakgul has updated the pull request. You must reimport the pull request before landing.

@halilozanakgul halilozanakgul force-pushed the add_wp_and_wc_versions_to_tests branch from 0c2f740 to 24b4125 Compare February 3, 2025 11:57
@facebook-github-bot
Copy link
Contributor

@halilozanakgul has updated the pull request. You must reimport the pull request before landing.

@halilozanakgul halilozanakgul force-pushed the add_wp_and_wc_versions_to_tests branch from 24b4125 to f4170f3 Compare February 4, 2025 15:10
@facebook-github-bot
Copy link
Contributor

@halilozanakgul has updated the pull request. You must reimport the pull request before landing.

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

Successfully merging this pull request may close these issues.

4 participants