tolerant-php-parser/.travis.yml

45 строки
1.1 KiB
YAML

language: php
php:
- '7.2'
- '7.3'
- '7.4'
- '8.0'
- '8.1'
env:
- VALIDATION=false
- VALIDATION=true
os:
- linux
matrix:
include:
- php: 7.2
env: STATIC_ANALYSIS=true
fast_finish: true
cache:
directories:
- validation/frameworks
before_script:
- composer install
- set -e # Stop on first error.
- phpenv config-rm xdebug.ini || true
- 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 [[ $STATIC_ANALYSIS = true ]]; then ./vendor/bin/phpstan analyse; fi
- |
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