Skip to content

Commit 3261ff1

Browse files
committed
Remove 5.6, tweak config add lint script
1 parent 4f7ba0b commit 3261ff1

File tree

3 files changed

+24
-10
lines changed

3 files changed

+24
-10
lines changed

.travis.yml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,41 @@ language: php
22

33
dist: trusty
44

5+
cache:
6+
directories:
7+
- $HOME/.composer/cache/files
8+
59
env:
610
global:
7-
- COMPOSER_ROOT_VERSION=2.x-dev
11+
- COMPOSER_ROOT_VERSION=4.2.x-dev
12+
- CORE_RELEASE=master
813

914
matrix:
15+
fast_finish: true
1016
include:
11-
- php: 5.6
12-
env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1
1317
- php: 7.0
1418
env: DB=MYSQL PHPUNIT_TEST=1
1519
- php: 7.1
16-
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1
20+
env: DB=MYSQL PDO=1 PHPUNIT_COVERAGE_TEST=1
1721

1822
before_script:
19-
# Init PHP
23+
# Init PHP
2024
- 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
2229
- composer validate
23-
- composer require silverstripe/recipe-cms 1.0.x-dev --no-update
2430
- 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
2533
- if [[ $PHPCS_TEST ]]; then composer global require squizlabs/php_codesniffer:^3 --prefer-dist --no-interaction --no-progress --no-suggest -o; fi
2634
- composer install --prefer-dist --no-interaction --no-progress --no-suggest --optimize-autoloader --verbose --profile
2735

2836
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
3240

3341
after_success:
3442
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi

composer.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@
2929
"FullscreenInteractive\\QueuedJobProgressField\\Tests\\": "tests/"
3030
}
3131
},
32+
"scripts": {
33+
"lint": "phpcs code/ tests/",
34+
"lint-clean": "phpcbf code/ tests/"
35+
},
3236
"prefer-stable": true,
3337
"minimum-stability": "dev"
3438
}

tests/QueuedJobProgressControllerTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
class QueuedJobProgressControllerTest extends FunctionalTest
1111
{
12+
protected $usesDatabase = true;
13+
1214
protected function getExtraRoutes()
1315
{
1416
return [

0 commit comments

Comments
 (0)