These tests are now also run as their own part of the Travis build, to ensure performance of other tests isn't affected by the presence of xdebug.
Fixes#40532.
git-svn-id: https://develop.svn.wordpress.org/trunk@45827 602fd350-edb4-49c9-b593-d223f7449a82
- Move the functionality for controlling `local-env` out of `package.json`, into JS scripts.
- Merge the `docker-compose` config files, and move it to the root directory. This allows `docker-compose.override.yml` to work for local overrides.
- Fix nginx redirecting to port 80 under some circumstances.
- `npm run env:install` now creates `wp-tests.config.php` for you.
- Cleaned up a bunch of cruft in `.travis.yml`.
See #47767.
git-svn-id: https://develop.svn.wordpress.org/trunk@45783 602fd350-edb4-49c9-b593-d223f7449a82
Additionally, there are a handful of related minor changes in this commit:
- `.travis.yml` has been tidied up a little.
- [45745] was incorrectly marking Travis jobs as passed when some PHPUnit runs failed.
- Add the `LOCAL_PHP_MEMCACHED` environment variable, for enabling Memcached.
- Add the `env:pull` NPM script, for refreshing Docker images.
See #47767.
git-svn-id: https://develop.svn.wordpress.org/trunk@45762 602fd350-edb4-49c9-b593-d223f7449a82
This commit adds the first iteration of a Docker-based config for setting up a local WordPress development environment.
Props pento, noisysocks, mcsf, pbearne, isabel_brison.
See #47767.
git-svn-id: https://develop.svn.wordpress.org/trunk@45745 602fd350-edb4-49c9-b593-d223f7449a82
All PHP files in `/tests` now conform to the PHP coding standards, or have exceptions appropriately marked.
Travis now also runs `phpcs` on the `/tests` directory, any future changes to these files must conform entirely to the WordPress PHP coding standards. 🎉
See #47632.
git-svn-id: https://develop.svn.wordpress.org/trunk@45607 602fd350-edb4-49c9-b593-d223f7449a82
- Adds a local environment based on docker
- Adds the e2e tests setup
- Adds a "Hello World" e2e test to serve as a template
Props gziolo, herregroen, mcsf.
Fixes#45165.
git-svn-id: https://develop.svn.wordpress.org/trunk@45570 602fd350-edb4-49c9-b593-d223f7449a82
The existing `"grunt": "grunt"` script in `package.json` allows for the use of `npm run grunt ...` which uses the local `grunt` binary in the project's `node_modules`.
Fixes#47380
git-svn-id: https://develop.svn.wordpress.org/trunk@45445 602fd350-edb4-49c9-b593-d223f7449a82
Previous [44982] and [44950].
This bumps the minimum version down slightly based on some research into the usage of php 5.6. This also brings the recommended version in line with https://wordpress.org/about/requirements/ .
The travis matrix is also being reduced in order to speed up builds. This is a hard break. PHP 5.2 - 5.5 we are never ever, ever, getting back together. You go talk to your friends, talk to my friends, talk to me, But we are never ever, ever, ever getting back together.
Props DD32, afergen for research.
Fixes#46594.
git-svn-id: https://develop.svn.wordpress.org/trunk@45058 602fd350-edb4-49c9-b593-d223f7449a82
This switches to caching npm's local cache instead of `node_modules` in order to prevent issues caused by modules compiled using a different version of node.
See #46632
git-svn-id: https://develop.svn.wordpress.org/trunk@44993 602fd350-edb4-49c9-b593-d223f7449a82
Travis have switched the nightly PHP version to PHP 8.0. The 7.4snapshot version is PHP 7.4.
We don't support 7.4 yet, so it's in allowed failures.
Fixes#46235.
git-svn-id: https://develop.svn.wordpress.org/trunk@44803 602fd350-edb4-49c9-b593-d223f7449a82
* Create an abstract `WP_UnitTestCase_Base` class to share between PHPUnit 7.x and older versions.
* Add a speed-trap loader to determine which `SpeedTrapListener` class needs to be loaded for the current PHPUnit version.
* Remove unnecessary `PHPUnit\Util\Test` and `PHPUnit_Util_Getopt` inheritances.
* Update Travis CI config to use PHPUnit 7.x for PHP 7.1, 7.2, and nightly PHP versions.
Props jipmoors, netweb, desrosj, ayeshrajans, soulseekah, SergeyBiryukov.
See #43218.
git-svn-id: https://develop.svn.wordpress.org/trunk@44701 602fd350-edb4-49c9-b593-d223f7449a82
Now that Node 10 is the LTS branch, with 10.13.0 as the first LTS release, let's use that for building WordPress.
Merges [43853] from the 5.0 branch to trunk.
Props pento.
See #45241.
git-svn-id: https://develop.svn.wordpress.org/trunk@44219 602fd350-edb4-49c9-b593-d223f7449a82
When switching themes, `wp_map_nav_menu_locations()` is used to ensure nav menus are placed in the relevant menu location. Occasionally, menus are registered to locations with numeric slugs, rather than strings. `wp_map_nav_menu_locations()` assumed it would be the latter, and ran `stripos()` on those numeric slugs. This behavior is deprecated in PHP 7.3.
As this is the last PHP 7.3 error in unit tests, this commit also removes PHP 7.3 from Travis' `allowed_failures` list.
Props pento, desrosj, jorbin.
Merges [43899] to trunk.
See #45018.
git-svn-id: https://develop.svn.wordpress.org/trunk@44167 602fd350-edb4-49c9-b593-d223f7449a82
Travis now supports PHP7.3 without workarounds, so let's remove the workarounds.
Merges [43726] to trunk.
See #44771.
git-svn-id: https://develop.svn.wordpress.org/trunk@43975 602fd350-edb4-49c9-b593-d223f7449a82
This functionality will cause the command to be retried up to three times in case of a non-zero return value. Implementing it on commands that perform network requests means that intermittent network failures are less likely to cause a build to fail, as they'll be retried up to three times.
See #44858
git-svn-id: https://develop.svn.wordpress.org/trunk@43645 602fd350-edb4-49c9-b593-d223f7449a82
WPCS 1.0.0 includes a bunch of new auto-fixers, which drops the number of coding standards issues across WordPress significantly. Prior to running the auto-fixers, there were 15,312 issues detected. With this commit, we now drop to 4,769 issues.
This change includes three notable additions:
- Multiline function calls must now put each parameter on a new line.
- Auto-formatting files is now part of the `grunt precommit` script.
- Auto-fixable coding standards issues will now cause Travis failures.
Fixes#44600.
git-svn-id: https://develop.svn.wordpress.org/trunk@43571 602fd350-edb4-49c9-b593-d223f7449a82
PHP has branched 7.2 and master is now 7.3. This change ensures that 7.2 is tested. As 7.2 is still in development and is not ready for production, failures are allowed.
See #40109.
git-svn-id: https://develop.svn.wordpress.org/trunk@41175 602fd350-edb4-49c9-b593-d223f7449a82
Starting today, Travis will begin switching the default image to `trusty`, which does not support PHP 5.2 or 5.3.
This is not a full fix, because Travis will be dropping `precise` support entirely in September (https://github.com/travis-ci/travis-ci/issues/8072). However, it buys us some time until then.
Props netweb.
Fixes#41292 for trunk.
git-svn-id: https://develop.svn.wordpress.org/trunk@41072 602fd350-edb4-49c9-b593-d223f7449a82
Now that the `WordPress/wordpress-develop` GitHub repo is syncing correctly, we can use it for Travis integration.
Props jorbin for getting the ball rolling so long ago, unprops jorbin because his Travis build can finally be retired.
Fixes#40712.
git-svn-id: https://develop.svn.wordpress.org/trunk@40604 602fd350-edb4-49c9-b593-d223f7449a82
The Travis cache is specific to the branch and language version (PHP version), so this should speed up each subsequent build once the cache is primed.
Props netweb
Fixes#40539
git-svn-id: https://develop.svn.wordpress.org/trunk@40538 602fd350-edb4-49c9-b593-d223f7449a82
This adds a compatibility shim for the new namespaced structure of PHPUnit and the removed `setExpectedException()` method. In addition, this updates the Travis config so PHPUnit 6.1 is used where appropriate.
Props miyauchi, gitlost.
Fixes#39822
git-svn-id: https://develop.svn.wordpress.org/trunk@40536 602fd350-edb4-49c9-b593-d223f7449a82
As a general rule, this means the fastest test jobs now run first because each subsequent version of PHP is faster than the previous. When a committer is patiently waiting for a Travis build to complete, they are at least more likely to see unexpected failures earlier than they otherwise would.
In addition, this updates the JavaScript test job to run on PHP 7.1.
Props netweb
See #39705
git-svn-id: https://develop.svn.wordpress.org/trunk@40434 602fd350-edb4-49c9-b593-d223f7449a82
This change moves to specifying the PHPUnit version for all PHP versions, and fixes an issue where the Composer global bin directory is not at `~/.composer/vendor/bin` on the boxes that are used for HHVM builds.
See #40100
git-svn-id: https://develop.svn.wordpress.org/trunk@40269 602fd350-edb4-49c9-b593-d223f7449a82
This avoids fatal errors while the tests remain incompatible with PHPUnit 6, which was recently introduced on Travis.
See #39822, #40086
git-svn-id: https://develop.svn.wordpress.org/trunk@40255 602fd350-edb4-49c9-b593-d223f7449a82
Unstable builds of PHP (nightly and hhvm) don't have the Xdebug extension enabled. Attempting to disable it results in a build error.
See #39978
git-svn-id: https://develop.svn.wordpress.org/trunk@40139 602fd350-edb4-49c9-b593-d223f7449a82
PHP 7.1 is the next version of PHP and WordPress should support it with the first major version after 7.1 launches. This will facilitate testing. Failures on 7.1 won't necessitate builds failing while 7.1 is still in beta.
Fixes#37625.
git-svn-id: https://develop.svn.wordpress.org/trunk@38273 602fd350-edb4-49c9-b593-d223f7449a82
In order to make local debugging of travis easier, output the npm and node versions when travis runs
git-svn-id: https://develop.svn.wordpress.org/trunk@37730 602fd350-edb4-49c9-b593-d223f7449a82