portrino/px_ical

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
env:
  global:
      - CC_TEST_REPORTER_ID=ecc3df30a8d661e8557cb990ccaa0e203b45e80acdaeaf40a2480144146b1f9d

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 -c phpstan.neon -l 7 Classes Tests; fi
after_script:
  - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT