silverstripe-reports/.travis.yml
Ingo Schommer a58416b6f6 New style travis tests
- Removed PHP 5.5. build (no longer supported)
- Removed PG and SQLite tests (tested through installer nightly)
- Added code coverage and linting tests
- Fixed linting errors
2017-06-26 21:45:56 +12:00

41 lines
1.2 KiB
YAML

language: php
sudo: false
env:
global:
- COMPOSER_ROOT_VERSION=1.0.x-dev
env:
global:
- CORE_RELEASE=master
matrix:
fast_finish: true
include:
- php: 5.6
env: DB=MYSQL PHPUNIT_TEST=1 PHPCS_TEST=1
- php: 7.0
env: DB=MYSQL PHPUNIT_TEST=1
- php: 7.1.2
env: DB=MYSQL PDO=1 PHPUNIT_COVERAGE_TEST=1
before_script:
- composer validate
- composer self-update || true
- "if [ \"$PHPCS_TEST\" = \"1\" ]; then pyrus install pear/PHP_CodeSniffer; fi"
- phpenv rehash
- phpenv config-rm xdebug.ini
- composer validate
- composer install --prefer-dist
- composer require --no-update --prefer-dist silverstripe/admin:1.0.x-dev silverstripe/framework:4.0.x-dev silverstripe/versioned:1.0.x-dev silverstripe/config:1.0.x-dev silverstripe/assets:1.0.x-dev --prefer-dist
- composer update
script:
- "if [ \"$PHPUNIT_TEST\" = \"1\" ]; then vendor/bin/phpunit; fi"
- "if [ \"$PHPCS_TEST\" = \"1\" ]; then composer run-script lint; fi"
- "if [ \"$PHPUNIT_COVERAGE_TEST\" = \"1\" ]; then vendor/bin/phpunit --coverage-clover=coverage.xml; fi"
after_success:
- "if [ \"$PHPUNIT_COVERAGE_TEST\" = \"1\" ]; then bash <(curl -s https://codecov.io/bash) -f coverage.xml; fi"