.travis.yml
env:
global:
- CC_TEST_REPORTER_ID=4c537b82125874eecacf48354ab975049a40934e8972e259d1263ebc9ab38c1e
language: php
branches:
only:
- master
- /^[0-9]+\.[0-9]+$/
- /^[0-9]+\.[0-9]+\.[0-9]+$/
sudo: false
cache:
directories:
- $HOME/.composer/cache
matrix:
fast_finish: true
include:
- php: 7.0
env: SYMFONY_PROCESS_VERSION=~2.7.35
- php: 7.0
env: SYMFONY_PROCESS_VERSION=~3.3
- php: 7.1
env: SYMFONY_PROCESS_VERSION=~2.7.35
- php: 7.1
env: SYMFONY_PROCESS_VERSION=~3.3
before_install:
- composer self-update
- composer --version
install:
- composer require symfony/process:$SYMFONY_PROCESS_VERSION
- composer install
before_script:
# Restore composer.json
- git checkout composer.json
- 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:
- >
echo;
echo "Running PHP PSR-2 Coding Standards Checks";
build/bin/phpcs --standard=PSR2 --warning-severity=0 src tests
- >
echo;
echo "Running unit tests";
build/bin/phpunit
- >
echo;
echo "Running PHP Static Analysis";
build/bin/phpstan analyse -c phpstan.neon -l 7 src tests
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT