mirror of
https://github.com/silverstripe/silverstripe-iframe
synced 2024-10-22 11:05:51 +02:00
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
# See https://github.com/silverstripe-labs/silverstripe-travis-support for setup details
|
|
|
|
sudo: false
|
|
|
|
language: php
|
|
|
|
php:
|
|
- 5.6
|
|
- 7.0
|
|
|
|
env:
|
|
global:
|
|
- DB=MYSQL CORE_RELEASE=3
|
|
- MODULE_PATH=iframe
|
|
- COVERAGE=0
|
|
|
|
matrix:
|
|
include:
|
|
- php: 5.6
|
|
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
|
|
allow_failures:
|
|
- php: 7.0
|
|
- php: 5.5.9
|
|
fast_finish: true
|
|
|
|
before_install:
|
|
- pip install --user codecov
|
|
|
|
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
|
|
- composer install
|
|
|
|
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"
|
|
|