.travis.yml
language: php
## Run on container environment
sudo: false
## Cache composer bits
cache:
directories:
- $HOME/.composer/cache
## List all PHP versions to test with
php:
- 7.1
- 7.2
## Install Dependencies
install:
- composer self-update
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi;
- composer update --prefer-dist --no-interaction
## Run Scripts before Tests
before_script:
- 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
- composer dump-autoload -o
## Run test Scripts
script:
- vendor/bin/phpunit
## Run Scripts after Tests
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT