From c5ad6954ce09a6f51c4a723f5bb8b7905a61efc6 Mon Sep 17 00:00:00 2001 From: Ariel Vallese Date: Mon, 10 Sep 2018 12:17:26 -0300 Subject: [PATCH] Setup TravisCI --- .travis.yml | 27 +++++++++++++++++++++++++++ phpunit-travis.xml | 22 ++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 .travis.yml create mode 100644 phpunit-travis.xml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b2cd904 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,27 @@ +language: php + +php: + - '7.1' + - '7.2' + - nightly + +env: + matrix: + - PREFER_LOWEST="--prefer-lowest --prefer-stable" + - PREFER_LOWEST="" + +before_install: +- composer install --dev + +before_script: +- composer update $PREFER_LOWEST +- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter +- chmod +x ./cc-test-reporter +- ./cc-test-reporter before-build + +script: +- ./vendor/bin/phpunit --coverage-clover ./build/logs/clover.xml --configuration phpunit-travis.xml + +after_script: +- mv build/logs/clover.xml clover.xml +- ./cc-test-reporter after-build --coverage-input-type clover --id $CODECLIMATE_REPO_TOKEN --exit-code $TRAVIS_TEST_RESULT diff --git a/phpunit-travis.xml b/phpunit-travis.xml new file mode 100644 index 0000000..ce34605 --- /dev/null +++ b/phpunit-travis.xml @@ -0,0 +1,22 @@ + + + + + ./tests/ + + + + + src/ + + +