diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..c45897a --- /dev/null +++ b/.travis.yml @@ -0,0 +1,20 @@ +language: php + +php: + - '7.0.17' + - '7.0' + - '7.1.2' + - nightly + +before_script: +# In case of timeouts and build failures you may want to prepend 'travis_retry' to the following commands: + - curl -s http://getcomposer.org/installer | php + - php composer.phar install -n + +# Explicitly use the phpunit from composer, not any system-wide found +script: + - vendor/bin/phpunit tests +# newer versions of phpunit allow this configuration: -c phpunit.xml --coverage-clover=coverage.xml tests + +after_success: + - php vendor/bin/codacycoverage clover diff --git a/README.md b/README.md index d3ffdd1..dc76bb4 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,9 @@ Add codacycoverage to your `.travis.yml`: ```yml # .travis.yml language: php + +# Do not forget to provide your CODACY_PROJECT_TOKEN as described in https://docs.travis-ci.com/user/environment-variables/#Defining-Variables-in-Repository-Settings + php: - 5.3 - 5.4 @@ -115,6 +118,7 @@ php: - 5.6 - hhvm +# In case of timeouts and build failures you may want to prepend 'travis_retry' to the following commands: before_script: - curl -s http://getcomposer.org/installer | php - php composer.phar install -n