Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX Update Travis configuration to be standalone, add codecov.io
- Loading branch information
1 parent
5437f6b
commit ad6a965
Showing
4 changed files
with
38 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
# See https://github.com/silverstripe/silverstripe-travis-support for setup details | ||
|
||
sudo: false | ||
|
||
language: php | ||
|
||
php: | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
|
||
env: | ||
- DB=MYSQL CORE_RELEASE=4 | ||
global: | ||
- COMPOSER_ROOT_VERSION="4.0.x-dev" | ||
|
||
matrix: | ||
include: | ||
- php: 5.6 | ||
env: DB=PGSQL CORE_RELEASE=4 | ||
env: DB=MYSQL PHPCS_TEST=1 PHPUNIT_TEST=1 | ||
- php: 7.0 | ||
env: DB=PGSQL PHPUNIT_TEST=1 | ||
- php: 7.1 | ||
env: DB=MYSQL PHPUNIT_COVERAGE_TEST=1 | ||
|
||
before_script: | ||
- composer self-update || true | ||
- git clone git://github.com/silverstripe/silverstripe-travis-support.git ~/travis-support | ||
- php ~/travis-support/travis_setup.php --source `pwd` --target ~/builds/ss | ||
- cd ~/builds/ss | ||
- composer install | ||
- phpenv rehash | ||
- phpenv config-rm xdebug.ini | ||
|
||
- composer install --prefer-dist | ||
- composer require --prefer-dist --no-update silverstripe/framework:4.0.x-dev | ||
- composer update | ||
|
||
- if [[ $DB == PGSQL ]]; then composer require silverstripe/postgresql:2.0.x-dev --prefer-dist; fi | ||
|
||
script: | ||
- vendor/bin/phpunit widgets/tests | ||
- if [[ $PHPUNIT_TEST ]]; then vendor/bin/phpunit tests/; fi | ||
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then phpdbg -qrr vendor/bin/phpunit --coverage-clover=coverage.xml; fi | ||
- if [[ $PHPCS_TEST ]]; then vendor/bin/phpcs --standard=framework/phpcs.xml.dist src/ tests/ ; fi | ||
|
||
after_success: | ||
- if [[ $PHPUNIT_COVERAGE_TEST ]]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
comment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<phpunit bootstrap="cms/tests/bootstrap.php" colors="true"> | ||
<testsuite name="Default"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
|
||
<filter> | ||
<whitelist addUncoveredFilesFromWhitelist="true"> | ||
<directory suffix=".php">src/</directory> | ||
<exclude> | ||
<directory suffix=".php">tests/</directory> | ||
</exclude> | ||
</whitelist> | ||
</filter> | ||
</phpunit> |