forked from raml-org/raml-php-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
76 lines (67 loc) · 1.83 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
php:
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- nightly
env:
global:
- LATEST_PHP_VERSION="7.3"
matrix:
- DEPENDENCIES="beta"
- DEPENDENCIES="low"
- DEPENDENCIES="stable"
matrix:
fast_finish: true
allow_failures:
- php: nightly
- env: DEPENDENCIES="beta"
- env: DEPENDENCIES="low"
before_install:
- echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- if [ -n "$GH_TOKEN" ]; then
composer config github-oauth.github.com ${GH_TOKEN};
fi;
- mkdir -p build/logs
install:
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
composer remove friendsofphp/php-cs-fixer phpstan/phpstan --dev;
fi
- if [ "$DEPENDENCIES" = "beta" ]; then
composer config minimum-stability beta;
composer update -n --prefer-dist;
elif [ "$DEPENDENCIES" = "low" ]; then
composer update -n --prefer-dist --prefer-lowest;
else
composer update -n --prefer-dist;
fi;
script:
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
echo "File validation is skipped for older PHP versions";
else
composer validate-files;
fi;
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
echo "Static analysis is skipped for older PHP versions";
else
composer run-static-analysis;
fi;
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
echo "Code style check is skipped for older PHP versions";
else
composer check-code-style;
fi;
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
echo "Security check is skipped for older PHP versions";
else
composer check-security;
fi;
- composer run-tests-with-clover
after_script:
- bin/php-coveralls -v