.travis.yml
language: php
dist: trusty
sudo: required
php:
- 5.6
- 7.0
- 7.1
- hhvm
cache:
directories:
- $HOME/.composer/cache
install:
# Install shellcheck
- sudo ./test/build/install.sh
before_script:
- composer self-update
- composer install --prefer-source --no-interaction
# PHPUnit
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "5.6" ]]; then composer require phpunit/phpunit 5.7.19; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.0" ]]; then composer require phpunit/phpunit 5.7.19; fi
- if [[ ${TRAVIS_PHP_VERSION:0:3} == "7.1" ]]; then composer require phpunit/phpunit 6.1.3; fi
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpunit --version; fi
script:
# Lint shell
- ./test/build/build.sh
# Install webstatus
- sudo ./bin/install.sh -y
# Run PHP unit tests
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then phpunit -c test/unit/phpunit.xml.dist; fi
after_script:
## Code climate
- if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then ./vendor/bin/test-reporter; fi