language: php
dist: bionic
php:
- 7.3
env:
matrix:
- COMPOSER_FLAGS="--prefer-lowest"
- COMPOSER_FLAGS=""
before_install:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
before_script:
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source
- ./cc-test-reporter before-build
script:
- composer run style:check || true
- composer run analyse || true
- composer run insights || true
- composer run test:coverage
after_script:
- |
if [[ "$TRAVIS_TEST_RESULT" == 0 && -z "$COMPOSER_FLAGS" ]]; then
./cc-test-reporter format-coverage --input-type clover --output build/code-climate-coverage.json build/coverage.xml
./cc-test-reporter upload-coverage --input build/code-climate-coverage.json
fi;
|