silverstripe-iframe/.travis.yml

54 lines
1.5 KiB
YAML
Raw Normal View History

2015-11-19 02:19:36 +01:00
# See https://github.com/silverstripe-labs/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
- 7.0
2015-10-30 03:20:37 +01:00
env:
global:
- 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
2015-10-30 03:20:37 +01:00
env: DB=MYSQL CORE_RELEASE=3
- php: 5.6
env: DB=PGSQL CORE_RELEASE=3
# Allowed to fail, meaning delayed code coverage reports
- php: 5.5.9
env: DB=MYSQL CORE_RELEASE=3 COVERAGE=1
2015-11-19 02:19:36 +01:00
allow_failures:
- php: 7.0
- 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-labs/silverstripe-travis-support.git ~/travis-support
- 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"