-
Notifications
You must be signed in to change notification settings - Fork 79
/
Copy path.travis.yml
44 lines (37 loc) · 1.07 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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