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

PHP Units tests: Symlink WC instead of moving the WC folder #2625

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

jorgemd24
Copy link
Contributor

@jorgemd24 jorgemd24 commented Sep 25, 2024

Changes proposed in this Pull Request:

Closes p1725522825461799-slack-C0410KV3YLW

The PHP Unit tests couldn't be installed because a dependency located in the WooCommerce repo is outside the plugin folder. The issue is because we moved the WC folder inside the plugin folder, preventing composer from accessing packages in the WooCommerce repo.

WC composer.json: https://github.com/woocommerce/woocommerce/blob/37bb36994b08d417e34b9043fea0bf92a3f9c236/plugins/woocommerce/composer.json#L19-L24

Package: https://github.com/woocommerce/woocommerce/tree/trunk/packages/php/blueprint

This PR resolve the issue by symlinking the WooCommerce folder instead of moving it.

The error was the following:

Source path "../../packages/php/blueprint" is not found for package woocommerce/blueprint

See: https://github.com/woocommerce/google-listings-and-ads/actions/runs/11035010424/job/30658509144#step:6:81

Screenshots:

Detailed test instructions:

  1. Checkout this branch and check that the PHP unit tests are installed correctly.

Additional details:

It seems that one test is failing: test_delete_created_product_calls_notify_directly but doesn't seem related to this PR.

Changelog entry

Dev - Fix missing blueprint dependency.

@github-actions github-actions bot added the changelog: dev Developer-facing only change. label Sep 25, 2024
@jorgemd24 jorgemd24 self-assigned this Sep 25, 2024
@jorgemd24 jorgemd24 requested a review from a team September 25, 2024 18:00
@jorgemd24 jorgemd24 changed the title Symlink WC instead of moving the WC folder PHP Units tests: Symlink WC instead of moving the WC folder Sep 25, 2024
@jorgemd24 jorgemd24 marked this pull request as ready for review September 25, 2024 18:10
@tomalec tomalec self-requested a review September 25, 2024 20:25
Copy link
Member

@tomalec tomalec left a comment

Choose a reason for hiding this comment

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

Thanks @jorgemd24 for fixing the workflow setup!

I checked the code and the workflow run and ran it for WC 9.4.0-beta.1. The tests were installed correctly and correctly failed on the unit test failure. LGTM

touch "$WC_VERSION_FILE"

ln -s "${WC_TMPDIR}"/plugins/woocommerce "$WC_DIR"
touch "$WC_VERSION_FILE"
Copy link
Contributor

Choose a reason for hiding this comment

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

Just a small note here about mixed spacing. This line uses a tab and 2 spaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sharp-eyed! Fixed here 2583950

@jorgemd24 jorgemd24 merged commit 24c212e into develop Sep 26, 2024
2 checks passed
@jorgemd24 jorgemd24 deleted the dev/fix-bluebird-dependency-issue branch September 26, 2024 08:18
@tomalec tomalec mentioned this pull request Oct 2, 2024
22 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog: dev Developer-facing only change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants