Skip to content
Snippets Groups Projects
.travis.yml 1.12 KiB
Newer Older
David Grudl's avatar
David Grudl committed
language: php
php:
    - 5.6
David Grudl's avatar
David Grudl committed
    - 7.0
env:
    - PHP_BIN=php
    - PHP_BIN=php-cgi

David Grudl's avatar
David Grudl committed
matrix:
    include:
        - php: 5.6
          env: dependencies="--prefer-lowest --prefer-stable" PHP_BIN=php
        - php: 7.0
          env: coverage="--coverage ./coverage.xml --coverage-src ./src" PHP_BIN=phpdbg
David Grudl's avatar
David Grudl committed
script:
    - vendor/bin/tester -p $PHP_BIN tests -s $coverage
    - php temp/code-checker/src/code-checker.php --short-arrays
David Grudl's avatar
David Grudl committed

after_failure:
    # Print *.actual content
    - for i in $(find tests -name \*.actual); do echo "--- $i"; cat $i; echo; echo; done

before_script:
David Grudl's avatar
David Grudl committed
    # Install Nette Tester & Code Checker
    - travis_retry composer update --no-interaction --prefer-dist $dependencies
    - travis_retry composer create-project nette/code-checker temp/code-checker ~2.5 --no-interaction
David Grudl's avatar
David Grudl committed

after_script:
    # Report Code Coverage
    - >
      if [ "$coverage" != "" ]; then
      wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
      && php coveralls.phar --verbose --config tests/.coveralls.yml
      || true; fi

sudo: false

cache:
    directories:
        - $HOME/.composer/cache