Skip to content

Commit

Permalink
Enable Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xificurk committed Jun 9, 2018
1 parent cce050b commit f9487d9
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
language: php
php:
- 7.1
- 7.2

env:
- COMPOSER_ARGS=""
- COMPOSER_ARGS="--prefer-stable"
- COMPOSER_ARGS="--prefer-stable --prefer-lowest"

jobs:
include:
- stage: Code Standard Checker
php: 7.1
install:
- mkdir -p /tmp/coding-standard
- composer --working-dir=/tmp/coding-standard init
- travis_retry composer --working-dir=/tmp/coding-standard require --no-interaction --prefer-dist --update-no-dev nepada/coding-standard ^5.0.0
script:
- /tmp/coding-standard/vendor/bin/phpcs --standard=/tmp/coding-standard/vendor/nepada/coding-standard/src/Nepada/ruleset.xml -sp src tests
- stage: Code Coverage
script:
- vendor/bin/tester -p phpdbg tests -s --coverage ./coverage.xml --coverage-src ./src
after_script:
- travis_retry wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.0.0/php-coveralls.phar
- php php-coveralls.phar --verbose --config tests/coveralls.yml
allow_failures:
- stage: Code Coverage

install:
- travis_retry composer create-project --no-interaction jakub-onderka/php-parallel-lint /tmp/php-parallel-lint ^1.0
- travis_retry composer create-project --no-interaction xificurk/phpstan-shim /tmp/phpstan ^0.9
- travis_retry composer update --no-interaction --prefer-dist $COMPOSER_ARGS

script:
- /tmp/php-parallel-lint/parallel-lint -e php,phpt --exclude tests/temp src tests
- vendor/bin/tester -s -p php -c tests/php.ini tests
- /tmp/phpstan/phpstan.phar analyse -c tests/phpstan.neon -l 7 src tests

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

sudo: false

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

0 comments on commit f9487d9

Please sign in to comment.