From 5f34cf1bed17a0974059a3d61d041034fa869436 Mon Sep 17 00:00:00 2001 From: Mark Heydon Date: Tue, 21 Apr 2020 13:53:22 +0100 Subject: [PATCH] Updated .travis.yml. --- .travis.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..e248e36 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +env: + global: + - CC_TEST_REPORTER_ID=200e7e42fffffffffff + - GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi) + +language: php + +sudo: false + +php: + - 7.3 + - 7.4 + +cache: + directories: + - $HOME/.composer/cache + +before_script: + - composer update --prefer-source --no-interaction --dev + - 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/phpcs" + - mkdir -p build/logs + - "vendor/bin/phpunit --coverage-text --coverage-clover build/logs/clover.xml" + - if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT; fi