diff --git a/.travis.yml b/.travis.yml index 3a81c84..376e657 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,33 +1,21 @@ # See https://github.com/silverstripe/silverstripe-travis-support for setup details -sudo: false +dist: trusty language: php -php: - - 5.6 - -env: - global: - - DB=MYSQL CORE_RELEASE=3 - - MODULE_PATH=iframe - - COVERAGE=0 - matrix: include: - - php: 5.6 - env: DB=MYSQL CORE_RELEASE=3.5 - - 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: 5.5.9 - fast_finish: true - -before_install: - - pip install --user codecov + - php: '5.6' + env: DB=MYSQL CORE_RELEASE=3.6 + - php: '7.0' + env: DB=PGSQL CORE_RELEASE=3.7 + - php: '7.1' + env: DB=MYSQL CORE_RELEASE=3.7 + - php: '7.2' + env: DB=MYSQL CORE_RELEASE=3.7 + - php: '7.3' + env: DB=MYSQL CORE_RELEASE=3.7 before_script: - composer self-update || true @@ -37,15 +25,4 @@ before_script: - 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" - + - vendor/bin/phpunit iframe/tests diff --git a/composer.json b/composer.json index ac6bf16..7240f39 100644 --- a/composer.json +++ b/composer.json @@ -16,5 +16,8 @@ "silverstripe/framework": "3.*", "silverstripe/cms": "3.*" }, + "require-dev": { + "phpunit/phpunit": "^5.7" + }, "extra": [] -} \ No newline at end of file +}