Commit Graph

60 Commits

Author SHA1 Message Date
Jeremy Felt 33a1131b17 Build Tools: Switch to Node 10.13.0.
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
2018-12-16 01:42:24 +00:00
Jonathan Desrosiers 2e78177467 Nav Menus: Fix a PHP 7.3 error when switching themes.
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
2018-12-14 05:15:54 +00:00
jorbin b4d7e7a878 Build/Test Tools: Use 7.3 for PHP 7.3
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
2018-12-11 04:20:02 +00:00
Aaron Jorbin a6adbc226f Build/Test Tools: Add PHP7.3 RC1 to the build matrix
Currently, we need to do some extra steps to run 7.3, but this will help us with testing compatibility.

See: https://github.com/travis-ci/travis-ci/issues/9717

See #44771.


git-svn-id: https://develop.svn.wordpress.org/trunk@43673 602fd350-edb4-49c9-b593-d223f7449a82
2018-10-04 02:04:53 +00:00
John Blackbourn 629c76c31b Build/Test Tools: Implement the automatic retry functionality that Travis CI provides.
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
2018-09-15 09:21:55 +00:00
Gary Pendergast a75d153eee Coding Standards: Upgrade WPCS to 1.0.0
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
2018-08-17 01:50:26 +00:00
Aaron Jorbin 16f9dea4ab BUILD/TEST TOOLS: Report Travis test results to make/hosting PHPUnit test results
Send the core test results to make/hosting in order to improve the alerting.  See: https://github.com/WordPress/phpunit-test-reporter/issues/45

Fixes #43099
Props danielbachhuber



git-svn-id: https://develop.svn.wordpress.org/trunk@42492 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-16 20:28:42 +00:00
Dion Hulse b938517860 Build: Bump the version of node used on Travis to match WordPress.org.
Props netweb, dd32.
See #35105


git-svn-id: https://develop.svn.wordpress.org/trunk@42464 602fd350-edb4-49c9-b593-d223f7449a82
2018-01-16 06:35:22 +00:00
John Blackbourn 11a2e57ae8 Build/Test tools: Remove PHP 7.2 from the allowed failures list on Travis CI.
Fixes #40109


git-svn-id: https://develop.svn.wordpress.org/trunk@41748 602fd350-edb4-49c9-b593-d223f7449a82
2017-10-04 19:53:07 +00:00
John Blackbourn a6f8f9668b Build/Test tools: Use the latest in the 4.x and 6.x branches of PHPUnit when running tests on Travis.
Props netweb, ayeshrajans

Fixes #41472


git-svn-id: https://develop.svn.wordpress.org/trunk@41294 602fd350-edb4-49c9-b593-d223f7449a82
2017-08-22 16:08:33 +00:00
John Blackbourn 9f3bcacd71 Build/Test Tools: More PHP 7.2 tweaks for Travis CI.
See #40109


git-svn-id: https://develop.svn.wordpress.org/trunk@41177 602fd350-edb4-49c9-b593-d223f7449a82
2017-07-27 21:31:40 +00:00
Aaron Jorbin cc134ea791 Build/Test Tools: Add PHP 7.2 to test matrix
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
2017-07-27 17:37:57 +00:00
James Nylen 9ddb744f33 Build: Switch PHP 5.2 and 5.3 to Travis' Ubuntu `precise` image
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
2017-07-18 08:24:35 +00:00
Gary Pendergast 93ddc497f0 Build/Test: Post Travis results to Slack from `WordPress/wordpress-develop`
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
2017-05-10 10:28:19 +00:00
John Blackbourn 34207d7aeb Build/Test Tools: Pin the WordPress Importer plugin to version 0.6.3 when testing on Travis.
Fixes #40620


git-svn-id: https://develop.svn.wordpress.org/trunk@40562 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-01 11:29:29 +00:00
John Blackbourn 46fab9de51 Build/Test Tools: Add object-cache.php to the unit test suite.
This removes an unnecessary external dependency from the Travis tests.

Fixes #40619


git-svn-id: https://develop.svn.wordpress.org/trunk@40561 602fd350-edb4-49c9-b593-d223f7449a82
2017-05-01 11:20:30 +00:00
John Blackbourn 127b1592f7 Build/Test Tools: Remove HHVM from the test infrastructure on Travis.
Fixes #40548


git-svn-id: https://develop.svn.wordpress.org/trunk@40546 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-24 00:27:28 +00:00
John Blackbourn 06391f0872 Build/Test Tools: Add Composer files to the cache on Travis.
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
2017-04-23 11:39:43 +00:00
John Blackbourn ce8a915c06 Build/Test Tools: Add support for PHPUnit 6+.
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
2017-04-23 02:05:12 +00:00
John Blackbourn 64581a4f05 Build/Test Tools: Add some locale debugging to the Travis config so we can determine which locales are available to test with.
See #40533, #19861


git-svn-id: https://develop.svn.wordpress.org/trunk@40528 602fd350-edb4-49c9-b593-d223f7449a82
2017-04-22 21:00:07 +00:00
John Blackbourn b55133da6e Build/Test tools: Reverse the order in which the Travis jobs run.
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
2017-04-15 17:42:07 +00:00
John Blackbourn 5d65051985 Build/Test tools: Don't install PHPUnit on the `travis:js` builds. Saves a couple of minutes of build time.
See #40100


git-svn-id: https://develop.svn.wordpress.org/trunk@40271 602fd350-edb4-49c9-b593-d223f7449a82
2017-03-10 23:56:07 +00:00
John Blackbourn 0df4906f9a Build/Test tools: Get Travis builds working on HHVM again.
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
2017-03-10 22:57:31 +00:00
John Blackbourn f5fddde456 Build/Test tools: Don't attempt to report PHP's extensions when running HHVM jobs on Travis. It doesn't work.
git-svn-id: https://develop.svn.wordpress.org/trunk@40267 602fd350-edb4-49c9-b593-d223f7449a82
2017-03-10 15:30:33 +00:00
John Blackbourn 509b17b6c9 Build/test tools: Add some more debugging to Travis and bring the format of the Xdebug fix inline with branches.
git-svn-id: https://develop.svn.wordpress.org/trunk@40259 602fd350-edb4-49c9-b593-d223f7449a82
2017-03-09 21:47:20 +00:00
Dominik Schilling (ocean90) 7ba64e2288 Build/Test Tools: On Travis CI install and use the node version which is specified in package.json.
Props netweb.
See #35105.

git-svn-id: https://develop.svn.wordpress.org/trunk@40258 602fd350-edb4-49c9-b593-d223f7449a82
2017-03-09 21:08:09 +00:00
John Blackbourn 38f5797e3c Build/Test tools: Account for PHP 5.2 when using Composer to install PHPUnit.
See #39822, #40086


git-svn-id: https://develop.svn.wordpress.org/trunk@40257 602fd350-edb4-49c9-b593-d223f7449a82
2017-03-09 20:53:37 +00:00
John Blackbourn 15ae03f4ab Build/Test tools: Explicitly use PHPUnit 5.7 for the PHP 7 builds on Travis.
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
2017-03-09 19:13:25 +00:00
John Blackbourn 91e1ae2a70 Build/Test tools: Remove the unnecessary clone of the twentysixteen repo.
This is no longer needed since #31550.

Fixes #40066


git-svn-id: https://develop.svn.wordpress.org/trunk@40252 602fd350-edb4-49c9-b593-d223f7449a82
2017-03-09 01:10:54 +00:00
John Blackbourn e799a8f4ca Build/Test Tools: Only attempt to disable Xdebug on stable builds of PHP.
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
2017-02-28 00:03:18 +00:00
John Blackbourn ca8ab8ae32 Build/Test Tools: Disable Xdebug when testing on Travis.
This should have some performance benefits, but I guess we'll need to wait and see.

See #39978


git-svn-id: https://develop.svn.wordpress.org/trunk@40138 602fd350-edb4-49c9-b593-d223f7449a82
2017-02-27 22:53:46 +00:00
Aaron Jorbin 5eddda525b Build/Test Tools: Remove PHP 7.1 from allowed failures
PHP 7.1 has been officially released. http://php.net/archive/2016.php#id2016-12-01-3

See #37625
Props helen, pento, The PHP team


git-svn-id: https://develop.svn.wordpress.org/trunk@39424 602fd350-edb4-49c9-b593-d223f7449a82
2016-12-02 06:37:46 +00:00
Aaron Jorbin 1bdd60ef65 Build/Test Tools: Ensure PHP 7.1 is tested on Travis.
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
2016-08-17 20:45:07 +00:00
Aaron Jorbin 174925b7a9 Output node and npm versions on travis
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
2016-06-16 17:27:22 +00:00
Gary Pendergast 7de95455cc Tests: Upgrade the HHVM job to use Ubuntu Trusty, and a more recent version of HHVM.
Also includes some tidying up of the `.travis.yml` file.

Props netweb.

Fixes #36930.



git-svn-id: https://develop.svn.wordpress.org/trunk@37555 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-25 06:11:20 +00:00
Dominik Schilling (ocean90) e420b09560 Travis CI: Include `npm prune` in the `before_script` command.
Caching of node modules was added in [37058]. `npm prune` removes extraneous packages so the cache contains only current modules.

Props netweb.
Fixes #36490.

git-svn-id: https://develop.svn.wordpress.org/trunk@37340 602fd350-edb4-49c9-b593-d223f7449a82
2016-05-01 20:03:59 +00:00
Aaron Jorbin 5cb70bd017 Don't announce PR builds in Slack
People may submit a PR to our travis build repo, we shouldn't notify slack when that happens.
See https://docs.travis-ci.com/user/notifications/#Slack-notifications

Fixes #36607



git-svn-id: https://develop.svn.wordpress.org/trunk@37268 602fd350-edb4-49c9-b593-d223f7449a82
2016-04-20 17:08:13 +00:00
Dominik Schilling (ocean90) 2a8573c6ca Travis CI: Allow to cache the node_modules directory.
This should speed up the installation of npm dependencies.

Props netweb.
Fixes #36291.

git-svn-id: https://develop.svn.wordpress.org/trunk@37058 602fd350-edb4-49c9-b593-d223f7449a82
2016-03-22 21:49:36 +00:00
Aaron Jorbin 49a18a8081 Remove PHP 7 from allowed failures list
PHP 7 has released it's 7th (and potentially final) Release Candidate today. While it is still not recommended for use in production, it is at a point that a test failure with it is something that needs to be triaged immediately. Congratulations to the PHP internals team on the upcoming final release of PHP 7.

Fixes #33410



git-svn-id: https://develop.svn.wordpress.org/trunk@35633 602fd350-edb4-49c9-b593-d223f7449a82
2015-11-12 21:44:24 +00:00
Dominik Schilling (ocean90) baf6f0bb6d Travis CI: Use a pinned version of the object cache drop-in.
Props tollmanz.
See #31491.

git-svn-id: https://develop.svn.wordpress.org/trunk@35218 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-16 14:15:18 +00:00
Dominik Schilling (ocean90) 159a5b518b Travis: Extend our test suite with a memcached instance.
To test persistent object caching Travis CI runs now a build on PHP 5.6 with memached enabled. The build uses the drop-in from https://github.com/tollmanz/wordpress-pecl-memcached-object-cache which is based on the PECL memcached extension.

Props pento, ocean90.
Fixes #31491.

git-svn-id: https://develop.svn.wordpress.org/trunk@35213 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-15 22:51:38 +00:00
Aaron Jorbin a0305d5020 Add Twenty Sixteen to travis builds
This allows the automated tests to include Twenty Sixteen.

Fixes #34315. See #34306.



git-svn-id: https://develop.svn.wordpress.org/trunk@35208 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-15 19:05:17 +00:00
Sergey Biryukov f25ef0e846 Remove `fast_finish: true` from Travis CI configuration for now.
Upstream: https://github.com/travis-ci/travis-ci/issues/4928

git-svn-id: https://develop.svn.wordpress.org/trunk@35150 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-13 21:35:43 +00:00
Aaron Jorbin f5276fcaa2 Add PHP Nightlies to the test suite
PHP branched master for 7, which means that nightly builds are now technically 7.1. The difference is minimal at the moment, but it's a good idea for us to test against the nightly build in part so that regressions can be reported upstream. Nightlies are allowed failure so that the build doesn't go red due to unstable versions. Additionally, nightlies are not officially supported by WordPress Core.

See #33410


git-svn-id: https://develop.svn.wordpress.org/trunk@34776 602fd350-edb4-49c9-b593-d223f7449a82
2015-10-02 16:50:53 +00:00
Aaron Jorbin 85ce7373b1 Move travis secure token under rooms
Travis lint says it is dropping the secure token, hence not actually pinging slack. According to http://docs.travis-ci.com/user/notifications/#Slack-notifications what we encrypt *should* be usable under rooms.  Will this work?  I don't know, but YOLO.

Fixes #30755



git-svn-id: https://develop.svn.wordpress.org/trunk@34567 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-26 00:03:24 +00:00
Aaron Jorbin 8bf8320afd Fix tabs vs spaces in .travis.yml
Introduced in [34555] . Bad Jorbin.



git-svn-id: https://develop.svn.wordpress.org/trunk@34558 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 20:12:09 +00:00
Aaron Jorbin 7576089c46 Add Travis Notifications to the #core channel on Slack
This is hopefully the final attempt at adding notifications to the #core channel on Slack. By default, Travis spams the channel. In order to cut that down a bit, notifications are set as follows:
 - On Failure: Always (If the tests fail, the world needs to know)
 - On Success: Change (this means that the first green run after a red run aka, the world is happy again)
 - On Start: Never (Travis runs every time there is a commit. No need for a notification)

Props Netweb, samuelsidler
Fixes #30755



git-svn-id: https://develop.svn.wordpress.org/trunk@34555 602fd350-edb4-49c9-b593-d223f7449a82
2015-09-25 19:42:53 +00:00
Mark Jaquith ba194364de Switch explicitly from `nightly` to `7.0` for Travis, for clarity.
props netweb
fixes #33136

git-svn-id: https://develop.svn.wordpress.org/trunk@33443 602fd350-edb4-49c9-b593-d223f7449a82
2015-07-27 15:15:34 +00:00
Aaron Jorbin 21f4857a32 Run unit tests on Travis CI with php nightlies
With PHP7 in active development, this will help us identify issues there. Also will be fun to see how fast it is.

Fixes #31454



git-svn-id: https://develop.svn.wordpress.org/trunk@31558 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-26 17:49:13 +00:00
Aaron Jorbin f5e1e43410 Restore PHP 5.2 to Travis CI
Travis restored PHP 5.2 support late last week.

upstream: https://github.com/travis-ci/travis-ci/issues/3152

Props netweb for the heads up
Fixes #31244 



git-svn-id: https://develop.svn.wordpress.org/trunk@31472 602fd350-edb4-49c9-b593-d223f7449a82
2015-02-18 17:46:18 +00:00