From 1046065625fb044cb1ba9fd76c605f9117ce3555 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Wed, 26 Jul 2017 16:51:09 +0100 Subject: [PATCH 1/3] Only install deps once we have a final set of requirements --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a97fb599..6ddfe678e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -59,12 +59,12 @@ before_script: # Install composer dependencies - export PATH=~/.composer/vendor/bin:$PATH - composer validate - - composer install --prefer-dist - - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist; fi - - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --prefer-dist; fi - - composer require silverstripe/config:1.0.x-dev silverstripe/admin:1.0.x-dev silverstripe/assets:1.0.x-dev silverstripe/versioned:1.0.x-dev --prefer-dist - - if [[ $PHPUNIT_TEST == cms ]] || [[ $BEHAT_TEST == cms ]]; then composer require silverstripe/cms:4.0.x-dev silverstripe/campaign-admin:1.0.x-dev silverstripe/siteconfig:4.0.x-dev silverstripe/reports:4.0.x-dev --prefer-dist; fi + - if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --no-update; fi + - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --no-update; fi + - composer require silverstripe/config:1.0.x-dev silverstripe/admin:1.0.x-dev silverstripe/assets:1.0.x-dev silverstripe/versioned:1.0.x-dev --no-update + - if [[ $PHPUNIT_TEST == cms ]] || [[ $BEHAT_TEST == cms ]]; then composer require silverstripe/cms:4.0.x-dev silverstripe/campaign-admin:1.0.x-dev silverstripe/siteconfig:4.0.x-dev silverstripe/reports:4.0.x-dev --no-update; fi - if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi + - composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile # Bootstrap dependencies - if [[ $PHPUNIT_TEST == cms ]] || [[ $BEHAT_TEST == cms ]]; then php ./cms/tests/bootstrap/mysite.php; fi From ecca05cc7f14a4d232e0087700f4da6abab7091f Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Wed, 26 Jul 2017 14:36:14 +0100 Subject: [PATCH 2/3] Add caching to travis --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6ddfe678e..47cacddec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,6 +4,11 @@ dist: precise sudo: false +cache: + directories: + - $HOME/.composer/cache/files + - vendor/ + addons: apt: packages: From 92bc069b583e129440f5be1f0adb87c81344d8c3 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Wed, 26 Jul 2017 17:36:39 +0100 Subject: [PATCH 3/3] only save composer cache --- .travis.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 47cacddec..6487c4d6a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,6 @@ sudo: false cache: directories: - $HOME/.composer/cache/files - - vendor/ addons: apt: