Update Travis builds to include PHP 7, update PHPUnit to 5.7

This commit is contained in:
Robbie Averill 2019-07-24 12:41:30 +02:00
parent 892d97ad6c
commit 785f51c30f
2 changed files with 16 additions and 36 deletions

View File

@ -1,33 +1,21 @@
# See https://github.com/silverstripe/silverstripe-travis-support for setup details # See https://github.com/silverstripe/silverstripe-travis-support for setup details
sudo: false dist: trusty
language: php language: php
php:
- 5.6
env:
global:
- DB=MYSQL CORE_RELEASE=3
- MODULE_PATH=iframe
- COVERAGE=0
matrix: matrix:
include: include:
- php: 5.6 - php: '5.6'
env: DB=MYSQL CORE_RELEASE=3.5 env: DB=MYSQL CORE_RELEASE=3.6
- php: 5.6 - php: '7.0'
env: DB=PGSQL CORE_RELEASE=3 env: DB=PGSQL CORE_RELEASE=3.7
# Allowed to fail, meaning delayed code coverage reports - php: '7.1'
- php: 5.5.9 env: DB=MYSQL CORE_RELEASE=3.7
env: DB=MYSQL CORE_RELEASE=3 COVERAGE=1 - php: '7.2'
allow_failures: env: DB=MYSQL CORE_RELEASE=3.7
- php: 5.5.9 - php: '7.3'
fast_finish: true env: DB=MYSQL CORE_RELEASE=3.7
before_install:
- pip install --user codecov
before_script: before_script:
- composer self-update || true - composer self-update || true
@ -37,15 +25,4 @@ before_script:
- composer install - composer install
script: script:
# Execute tests with no coverage. This is the fastest option - vendor/bin/phpunit iframe/tests
- "if [ \"$COVERAGE\" = \"0\" ]; then vendor/bin/phpunit $MODULE_PATH/tests/; fi"
# Execute tests with coverage. Do this for a small
- "if [ \"$COVERAGE\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.clover $MODULE_PATH/tests/; fi"
after_script:
- "if [ \"$COVERAGE\" = \"1\" ]; then mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/; fi"
- cd ~/build/$TRAVIS_REPO_SLUG
- wget https://scrutinizer-ci.com/ocular.phar
- "if [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov && travis_retry php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi"

View File

@ -16,5 +16,8 @@
"silverstripe/framework": "3.*", "silverstripe/framework": "3.*",
"silverstripe/cms": "3.*" "silverstripe/cms": "3.*"
}, },
"require-dev": {
"phpunit/phpunit": "^5.7"
},
"extra": [] "extra": []
} }