silverstripe-iframe/.travis.yml

52 lines
1.5 KiB
YAML
Raw Normal View History

# See https://github.com/silverstripe/silverstripe-travis-support for setup details
2015-10-30 03:20:37 +01:00
sudo: false
2015-11-19 02:19:36 +01:00
language: php
php:
- 5.6
2015-10-30 03:20:37 +01:00
env:
global:
2017-05-10 22:28:40 +02:00
- DB=MYSQL CORE_RELEASE=3
- MODULE_PATH=iframe
- COVERAGE=0
2015-10-30 03:20:37 +01:00
matrix:
include:
2015-11-19 02:19:36 +01:00
- php: 5.6
env: DB=MYSQL CORE_RELEASE=3.5
2015-10-30 03:20:37 +01:00
- php: 5.6
2017-05-10 22:28:40 +02:00
env: DB=PGSQL CORE_RELEASE=3
# Allowed to fail, meaning delayed code coverage reports
- php: 5.5.9
2017-05-10 22:28:40 +02:00
env: DB=MYSQL CORE_RELEASE=3 COVERAGE=1
2015-11-19 02:19:36 +01:00
allow_failures:
- php: 5.5.9
fast_finish: true
before_install:
- pip install --user codecov
2015-10-30 03:20:37 +01:00
before_script:
- composer self-update || true
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
2015-10-30 03:20:37 +01:00
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss
- cd ~/builds/ss
2015-11-19 02:19:36 +01:00
- composer install
2015-10-30 03:20:37 +01:00
2015-11-19 02:19:36 +01:00
script:
# Execute tests with no coverage. This is the fastest option
- "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"