Commit Graph

122 Commits

Author SHA1 Message Date
Julia Amosova defbcc456e Adjust `npm install` in travis / docker setup 2019-12-03 22:21:41 +00:00
Julia Amosova 8fb30e8f5b Add `npm run build` to travis / docker setup 2019-12-03 21:24:58 +00:00
Julia Amosova f95e3c0e11 More Travis + Docker setup tweaks 2019-12-03 19:17:32 +00:00
Julia Amosova 4b26146613 Additional Travis + Docker setup tweaks 2019-12-03 19:07:43 +00:00
Julia Amosova 37e367f379 Resolve conflicts with master branch 2019-12-03 18:49:28 +00:00
Julia Amosova 4c8c4a8dbf Adjust Travis + Docker setup 2019-12-03 18:43:33 +00:00
Julia Amosova a7e582b1bb Update docker-compose file & setup running e2e tests on Travis CI 2019-11-26 20:34:00 +00:00
Gerhard e0e05928c8 Move E2E tests to allowed_failures section while we wrap up new e2e tests. 2019-11-25 13:37:30 +02:00
Rodrigo Primo 3482dd3a79 Remove PHP 7.4 job from the list of Travis jobs allowed to fail
Now that WP fixed all the PHP 7.4 related notices and that the WC unit
tests are passing when running against this PHP version, we can remove
the PHP 7.4 from the list of Travis jobs that are allowed to fail.
2019-09-23 14:38:27 -03:00
Rodrigo Primo 9399224f9e Add PHP 7.4 to the list of Travis build jobs
This commit adds the upcoming PHP 7.4 to the list of Travis build jobs
so that we can start testing WooCommerce with this new version of PHP
that is scheduled to be released in November.
2019-08-23 08:34:30 -03:00
Gerhard 4eae977494 Chrome beta 2019-08-05 15:09:49 +02:00
Gerhard e7ce889c9c Use start-stop deamon 2019-08-05 14:52:43 +02:00
Gerhard 862c43c553 xvfb needs to be started in before_script 2019-08-05 14:43:54 +02:00
Gerhard 5a9cb3e862 Include headless browser in services 2019-08-05 14:34:42 +02:00
Gerhard a58cced761 Instruct mysql to start 2019-08-05 14:33:51 +02:00
Gerhard 4b624bc477 Xenial not Bionic 2019-08-05 14:29:09 +02:00
Gerhard c078fdb9e1 Update travis dist to bionic, bionic has support for PHP 5.6 and up. 2019-08-05 14:20:22 +02:00
Claudio Sanches d09009261f Fixed UnitTests in PHP 5.6 2019-07-18 22:46:28 -03:00
Claudio Sanches 838dd31e00 Updated PHPUnit in Travis 2019-07-18 22:09:12 -03:00
Claudio Sanches da99bc8ca0 Merge branch 'master' into feature/feature-plugin-packages 2019-07-08 14:33:21 -03:00
Peter Fabian 8c0bf2795f Install sniffs only when running PHPCS. 2019-07-04 10:17:39 +02:00
Mike Jolley 3b974da08f Update readme and contributing docs 2019-06-26 17:20:47 +01:00
Mike Jolley ddc8ccf104 Fix travis config 2019-06-26 17:02:31 +01:00
Mike Jolley 26391f3fb6 composer install for travis 2019-06-26 16:25:16 +01:00
Peter Fabian c4b48eb64e Fix WP version to 5.1.1, last one that supports PHP < 5.6. 2019-06-13 15:43:59 +02:00
Gerhard a2953da9ad Bump minimum PHP version to 5.6, update travis to remove 5.2 and 5.3 tests. 2019-06-13 11:28:18 +02:00
Mike Jolley aa301bda4c
Merge pull request #23106 from rodrigoprimo/travis-chromedriver
Only install Chrome and Nginx in the build job that uses it
2019-03-27 11:54:59 +00:00
Rodrigo Primo 6001b0177e Only install Chrome and Nginx in the build job that uses it
This commit changes Travis configuration to only install Chrome and Nginx in the e2e tests build job, which is the only one that requires those packages. This change should save a little bit of time in the Travis build as before Travis was installing Chrome and Nginx in all the jobs.
2019-03-21 15:44:02 -03:00
Rodrigo Primo 61a096d871 Fix PHPCS in the Travis builds
PR https://github.com/woocommerce/woocommerce/pull/23082 made some changes to the Travis configuration and one of those changes broke the PHPCS when running inside Travis with the following error:

```
ERROR: Referenced sniff "WooCommerce-Core" does not exist
```

For example: https://travis-ci.org/woocommerce/woocommerce/jobs/509471213#L659

This problem went unnoticed during the PR review as no PHP file was modified in it and thus there was no file for PHPCS to check.

This commit fixes the error above by installing the Composer package `woocommerce/woocommerce-sniffs` which is the package that provides `WooCommerce-Core` sniffs and which installs `wp-coding-standards/wpcs` as one of its requirements. I couldn't find an easy way to make this work installing `woocommerce/woocommerce-sniffs` globally so that is why this commit also removes the `global` parameter when calling composer.
2019-03-21 15:23:42 -03:00
Gerhard 589f561c5e Restore cache 2019-03-19 15:46:24 +02:00
Gerhard 0a1eb076ea Add PHPUnit call fallback for 5.2 specifically 2019-03-19 15:23:36 +02:00
Gerhard 506b1cec55 Restore Codecoverage to PHP 7.1 2019-03-19 15:17:11 +02:00
Gerhard 608579e987 Also update the include matrix with right version info for codecoverage 2019-03-19 15:05:14 +02:00
Gerhard 323935a1e8 Remove cache as it might cause issues with Scrutinizer 2019-03-19 14:57:19 +02:00
Gerhard 0824423752 Run Codecoverage using PHP 7.3 2019-03-19 14:48:45 +02:00
Gerhard a59969ca53 Do not try to run composer on PHP 5.2 and default to phpunit command instead of specifying path, travis will first try and look for in the composer dirs. 2019-03-19 14:30:54 +02:00
Gerhard cb6b43528a Add 5.3 to PHP versions 2019-03-19 14:20:28 +02:00
Gerhard 978b94c44f Move back to precise 2019-03-19 14:09:53 +02:00
Gerhard b06caa4fbf Workaround for PHP5.2 and Composer 2019-03-19 14:01:14 +02:00
Gerhard e2d68820a5 Use xenial instead of precise 2019-03-19 13:53:23 +02:00
Gerhard dc99c30772 Move phpunit call after first params 2019-03-19 13:33:21 +02:00
Gerhard b105550b47 Changes to travis, globally install phpunit and wpcs when required, cache vendor and composer cache directories 2019-03-19 13:14:42 +02:00
Rodrigo Primo c17aba608e Add a new Travis job to run WC unit tests using WordPress nightly
Doing this to help us find problems in the upcoming versions of WordPress.
2019-01-16 09:09:54 -02:00
Rodrigo Primo 540d10cbc0 Use WP latest instead of 5.0-beta3 to run the PHP 7.3 Travis build job
Now that WP 5.0 has been released, we don't need to use 5.0-beta3 anymore to run the PHP 7.3 Travis build job.
2018-12-19 11:53:46 -02:00
Rodrigo Primo 87e47cd1a8 Use the "name" config property to better identify build jobs 2018-12-19 11:08:32 -02:00
Rodrigo Primo 644f6b1cba Use separate Travis build jobs to run e2e tests and PHPCS
This commit creates two new Travis build jobs, one to run the e2e tests and another to run PHPCS. Doing this, instead of running those two checks in the same build job as the PHP 7.2 unit tests, should make the total build time shorter and it should make it easier to see why the build failed.
2018-12-06 09:14:13 -02:00
Rodrigo Primo 522df96217 Make sure PHPUnit tests runs when using PHP 7.2+ in the Travis builds
Due to a recent change in the Travis environment, WooCommerce unit tests stopped working with the following error (see for example https://travis-ci.org/woocommerce/woocommerce/jobs/463470674#L876) in the PHP 7.2 and 7.3 build jobs:

Fatal error: Class PHPUnit_Util_Test may not inherit from final class (PHPUnit\Util\Test) in /tmp/wordpress-tests-lib/includes/phpunit6-compat.php on line 18

This error is happening because Travis started ignoring the PHPUnit version that we install manually via Composer (f7bc3fb851/tests/bin/travis.sh (L6)) and started using the PHPUnit version that is shipped with each of its PHP docker images. This means that for the docker images running PHP 7.2 and 7.3, PHPUnit 7 is used but the WordPress unit test framework is not compatible with PHPUnit 7 (see WordPress core ticket https://core.trac.wordpress.org/ticket/43218) and produces the error above. I believe that this is happening because Travis changed the directory where it installs composer global packages from `$HOME/.composer/` to `$HOME/.config/composer/` (https://github.com/travis-ci/travis-ci/issues/7289#issuecomment-427333966) and we add `$HOME/.composer/vendor/bin:$PATH` to the `$PATH`. So this commit simply updates the path in the line where we add it to the `$PATH`.

I tried to use `composer exec` instead of updating `$PATH` but that didn't work for PHP 5.2.
2018-12-05 15:15:49 -02:00
Rodrigo Primo 4c581f5a87 Remove PHP 7.3 from the list of build jobs that are allowed to fail
Now that all the required changes to make WooCommerce work fine with PHP 7.3 were implemented, it is safe to remove PHP 7.3 from the list of Travis build jobs that are allowed to fail.
2018-11-21 12:30:06 -02:00
Rodrigo Primo 68abf960f4 Use WP 5.0-beta5 when running PHP 7.3 in Travis
To make it easier to test WC running the upcoming PHP 7.3, this commit changes the PHP 7.3 Travis build to run unit tests using WP 5.0-beta5. This way we won't display WP core warnings related to PHP 7.3 that were already fixed in the upcoming WP version and will be able to see only WC related warnings.

My initial plan was to use WP nightly but that didn't work as nightly is still build from trunk and WP 5.0 development is being done on another branch (https://make.wordpress.org/core/2018/10/05/wordpress-5-0-commit-management/).
2018-11-20 14:43:27 -02:00
Rodrigo Primo 9fac8cc8ad Remove xdebug.ini only if it exists
This commit adds an if to check if xdebug.ini exists before trying to remove it. Doing this to avoid a build error in PHP versions where the file doesn't exist like PHP 7.3.
2018-10-16 10:36:25 -03:00