silverstripe-comments/.travis.yml

48 lines
1.3 KiB
YAML
Raw Normal View History

language: php
2013-03-29 09:33:51 +01:00
addons:
apt:
packages:
- tidy
2015-11-19 02:18:53 +01:00
php:
- 5.6
- 7.0
- 7.1
2015-11-19 02:18:53 +01:00
before_install:
- pip install --user codecov
2013-03-29 09:33:51 +01:00
env:
global:
- DB=MYSQL CORE_RELEASE=4
2013-03-29 09:33:51 +01:00
matrix:
include:
- php: 7.1
env: DB=MYSQL CORE_RELEASE=4 COVERAGE=1
- php: 5.6
env: DB=PGSQL CORE_RELEASE=4
- php: 5.6
env: DB=SQLITE CORE_RELEASE=4
2013-03-29 09:33:51 +01:00
before_script:
- phpenv rehash
2015-11-19 02:18:53 +01:00
- composer self-update || true
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support
# Install suggested modules in order to maximize test coverage
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss --require "ezyang/htmlpurifier:4.*,silverstripe/cms:^4.0@dev"
2015-11-19 02:18:53 +01:00
- cd ~/builds/ss
2013-03-29 09:33:51 +01:00
2015-11-19 02:18:53 +01:00
script:
# Execute tests with no coverage. This is the fastest option
- "if [ \"$COVERAGE\" != \"1\" ]; then vendor/bin/phpunit comments/tests/; fi"
# Execute tests with coverage. Do this for a small
- "if [ \"$COVERAGE\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.clover comments/tests/; fi"
after_success:
- "if [ \"$COVERAGE\" = \"1\" ]; then mv coverage.clover ~/build/$TRAVIS_REPO_SLUG/; fi"
- cd ~/build/$TRAVIS_REPO_SLUG
- "if [ \"$COVERAGE\" = \"1\" ]; then travis_retry codecov; fi"