tolerant-php-parser/.travis.yml

40 строки
966 B
YAML

language: php
php:
- 7.0
- 7.1
env:
- VALIDATION=false
- VALIDATION=true
os:
- linux
matrix:
fast_finish: true
allow_failures:
- env: VALIDATION=true
cache:
directories:
- validation/frameworks
before_script:
- composer install
- set -e # Stop on first error.
- phpenv config-rm xdebug.ini
- if find . -name "*.php" -path "./src/*" -path "./experiments/*" -path "./tools/*" -path "./syntax-visualizer/server/src/*" -exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi
- if find . -name "*.php" -path "./tests/*" -path "./validation/*" -maxdepth 0 --exec php -l {} 2>&1 \; | grep "syntax error, unexpected"; then exit 1; fi
script:
- composer validate
- |
if [[ $VALIDATION = true ]]; then
./vendor/bin/phpunit --testsuite validation
else
./vendor/bin/phpunit --testsuite invariants
./vendor/bin/phpunit --testsuite grammar
./vendor/bin/phpunit --testsuite api
fi