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

Fix tests #274

Merged
merged 11 commits into from
Jul 1, 2024
Merged

Fix tests #274

merged 11 commits into from
Jul 1, 2024

Conversation

dd32
Copy link
Member

@dd32 dd32 commented Jul 1, 2024

I don't fully understand all the changes I've made in this PR, but it makes things pass.

@adamwoodnz
Copy link
Contributor

I had to update the .nvmrc to Node 18 to get an install to work

yarn install v1.22.19
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
error @wordpress/base-styles@5.2.0: The engine "node" is incompatible with this module. Expected version ">=18.12.0". Got "14.19.3"
error Found incompatible module.
@@ -8,8 +8,8 @@
"private": true,
"scripts": {
"wp-env": "wp-env",
"setup:tools": "yarn wp-env run composer install",
"test": "yarn wp-env run phpunit phpunit -c /var/www/html/wp-content/plugins/wporg-two-factor/phpunit.xml.dist",
"setup:tools": "yarn wp-env run cli --env-cwd=wp-content/plugins/wporg-two-factor composer install",
Copy link
Contributor

Choose a reason for hiding this comment

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

I missed this and didn't run it, just composer install && yarn test worked for me

Copy link
Member Author

Choose a reason for hiding this comment

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

I think this depends on the version you have installed locally; I found running composer via the containers was more reliable.

The composer is also expecting to be able to modify ../../../mu-plugins/pub which won't be in the right place when run outside of the containers.

@dd32
Copy link
Member Author

dd32 commented Jul 1, 2024

I had to update the .nvmrc to Node 18 to get an install to work

I'm running v20 locally, but evidently whatever is default in github actions is working.. so.. I guess .nvmrc isn't being used?

package.json Outdated Show resolved Hide resolved
@adamwoodnz
Copy link
Contributor

adamwoodnz commented Jul 1, 2024

I had to update the .nvmrc to Node 18 to get an install to work

I'm running v20 locally, but evidently whatever is default in github actions is working.. so.. I guess .nvmrc isn't being used?

Yeah the workflows aren't calling nvm use which isn't ideal.

@dd32
Copy link
Member Author

dd32 commented Jul 1, 2024

I've bumped the nvm version, and pulled the package updates (since I didn't verify if it didn't change anything).

I broke my local environment by restarting wp-env, so pushed it to see if the actions pass or fail..

Copy link
Contributor

@adamwoodnz adamwoodnz left a comment

Choose a reason for hiding this comment

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

LGTM

@dd32 dd32 merged commit c0ab95e into trunk Jul 1, 2024
2 checks passed
@dd32 dd32 deleted the fix/tests branch July 1, 2024 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants