.travis.yml
env:
global:
- CC_TEST_REPORTER_ID=6458504a8bda746404dc8585d34416d701736d0b4478759e85356c5b4569b0a6
language: php
matrix:
fast_finish: true
include:
- php: 5.5
env: TYPO3_VERSION=^7.6 PHPSTAN=0
- php: 5.6
env: TYPO3_VERSION=^7.6 PHPSTAN=0
- php: 7.0
env: TYPO3_VERSION=^7.6 PHPSTAN=1
- php: 7.1
env: TYPO3_VERSION=^7.6 PHPSTAN=1
sudo: false
addons:
apt:
packages:
- parallel
cache:
directories:
- $HOME/.composer/cache
before_install:
- composer self-update
- composer --version
before_script:
- composer require typo3/cms=$TYPO3_VERSION
# Restore composer.json
- git checkout composer.json
- export TYPO3_PATH_WEB=$PWD/build/web
- 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 Classes/ Tests/Unit/
- >
echo;
echo "Running unit tests";
build/bin/phpunit --colors --coverage-clover build/logs/clover.xml Tests/Unit/
- >
echo;
echo "Running PHP Static Analysis";
if [[ $PHPSTAN = 1 ]]; then composer require --dev phpstan/phpstan:^0.8 && build/bin/phpstan analyse -l 7 Classes Tests; fi
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT