@@ -2,33 +2,41 @@ language: php
2
2
3
3
dist : trusty
4
4
5
+ cache :
6
+ directories :
7
+ - $HOME/.composer/cache/files
8
+
5
9
env :
6
10
global :
7
- - COMPOSER_ROOT_VERSION=2.x-dev
11
+ - COMPOSER_ROOT_VERSION=4.2.x-dev
12
+ - CORE_RELEASE=master
8
13
9
14
matrix :
15
+ fast_finish : true
10
16
include :
11
- - php : 5.6
12
- env : DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
13
17
- php : 7.0
14
18
env : DB=MYSQL PHPUNIT_TEST=1
15
19
- php : 7.1
16
- env : DB=MYSQL PHPUNIT_COVERAGE_TEST=1
20
+ env : DB=MYSQL PDO=1 PHPUNIT_COVERAGE_TEST=1
17
21
18
22
before_script :
19
- # Init PHP
23
+ # Init PHP
20
24
- phpenv rehash
21
- - phpenv config-rm xdebug.ini
25
+ - phpenv config-rm xdebug.ini || true
26
+
27
+ # Install composer dependencies
28
+ - export PATH=~/.composer/vendor/bin:$PATH
22
29
- composer validate
23
- - composer require silverstripe/recipe-cms 1.0.x-dev --no-update
24
30
- if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --no-update; fi
31
+ - if [[ $DB == SQLITE ]]; then composer require silverstripe/sqlite3:2.0.x-dev --no-update; fi
32
+ - composer require silverstripe/recipe-core:4.2.x-dev silverstripe/admin:1.2.x-dev silverstripe/versioned:1.2.x-dev --no-update
25
33
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
26
34
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
27
35
28
36
script :
29
- - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit tests/ ; fi
30
- - if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi
31
- - if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=vendor/silverstripe/framework/phpcs.xml.dist src/ tests/ ; fi
37
+ - if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit tests; fi
38
+ - if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml tests ; fi
39
+ - if [[ $PHPCS_TEST ]]; then composer run-script lint ; fi
32
40
33
41
after_success :
34
42
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi
0 commit comments