-
Notifications
You must be signed in to change notification settings - Fork 48
/
.travis.yml
52 lines (46 loc) · 1.35 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
45
46
47
48
49
50
51
52
sudo: false
# Env
env:
global:
- secure: "Bpk0MKl7UBsIlNd0LrbDzElBZxS3OQJaetXlQHbNus6YZiVLC60/bo9Gu9StrBKcdrGifqzpgdETBuCUNl9ncODGba5bj4i/n6EbrXUaSWagwi6wnNjMJW3BzeUqaJabrpb6FVg9oKqdI7cfRelasJhVjpcVPnMULRxGnKtnMaY="
# Language
language: php
env:
global:
- PHPCS=0 PLUGINS=0
matrix:
include:
- php: 7.2
- php: 7.3
- php: 7.4
env: PHPCS=1
# Notifications
notifications:
webhooks:
urls:
# Gitter.im channel hook
secure: I/k3DJq2crx71BMW4UjTxgnx9Qj/H8ttmt7G0Qhyz47yqUJ8dfsYiyLu0QX19kIF/IXWU6BDXZxCvdM8/5vN5D3TFaNXu6VCK6CtXutgAEyj7Fgeg5tDq5Jt+c5j2E+jjIMWeeUCKYIY+zsKFMtQLx68Fa613tNQIUcnxpy5HYY=
on_success: always
on_failure: always
# Scripts
install:
- composer selfupdate --quiet
- composer install --prefer-dist --no-interaction
- |
if [ "$PLUGINS" = "1" ]; then
lib/vendor/bin/phing phile-plugins-install
fi
script:
- |
echo; echo "Running unit tests";
lib/vendor/bin/phpunit;
- |
echo; echo "Running code formatting tests";
if [ "$PHPCS" = "1" ]; then
if ! find lib plugins/phile -name \*.php -not -path 'lib/vendor/*' -exec php -l "{}" \; > /tmp/errors 2>&1; then
grep -v \"No syntax errors detected in\" /tmp/errors;
exit 99;
fi;
fi;
- if [ $PHPCS = 1 ]; then lib/vendor/bin/phpcs -p; fi
- if [ $PHPCS = 1 ]; then lib/vendor/bin/phpstan analyze -c phpstan.neon; fi