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 wp-env and utilize for running PHPUnit locally #778

Merged
merged 4 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@

# Generated via bin/transform-readme.php
/readme.txt
/.wp-env.override.json
17 changes: 17 additions & 0 deletions .wp-env.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"env": {
"development": {
"plugins": [
"."
]
},
"tests": {
"plugins": [
"."
],
"mappings": {
"../wordpress-develop": "WordPress/wordpress-develop#trunk"
}
}
}
}
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ module.exports = function (grunt) {
.trim()
.split(/\n/)
.filter(function (file) {
return !/^(\.|bin|([^/]+)+\.(json|xml)|Gruntfile\.js|tests|README\.md|CONTRIBUTING\.md|\.wordpress-org|composer\..*|webpack.*)/.test(
return !/^(\.|bin|([^/]+)+\.(json|xml)|Gruntfile\.js|tests|README\.md|CONTRIBUTING\.md|\.wordpress-org|composer\..*|webpack.*|phpstan.*)/.test(
file
);
});
Expand Down
2 changes: 2 additions & 0 deletions bin/ci/install-wp-tests.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

# TODO: This should be eliminated in favor of using Docker on GitHub Actions.

set -e

if [ $# -lt 3 ]; then
Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
"dealerdirect/phpcodesniffer-composer-installer": "0.7.2",
"php-stubs/wordpress-stubs": "^5.9.3",
"phpcompatibility/phpcompatibility-wp": "2.1.3",
"wp-cli/wp-cli": "^2.6",
"wp-coding-standards/wpcs": "2.3.0",
"yoast/wp-test-utils": "^0.2.2"
},
Expand Down
Loading