-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
88 lines (79 loc) · 2.4 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
77
78
79
80
81
82
83
84
85
86
87
88
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
php:
- 7.2
- 7.3
- 7.4
- nightly
env:
global:
- LATEST_PHP_VERSION="7.4"
matrix:
- SYMFONY_VERSION="3.4.*"
- SYMFONY_VERSION="4.3.*"
- SYMFONY_VERSION="4.4.*"
- SYMFONY_VERSION="5.0.*"
- SYMFONY_VERSION="5.1.*"
- SYMFONY_VERSION="dev-master"
- DEPENDENCIES="beta"
- DEPENDENCIES="low"
- DEPENDENCIES="stable"
matrix:
fast_finish: true
allow_failures:
- php: nightly
- env: DEPENDENCIES="beta"
- env: DEPENDENCIES="low"
- env: SYMFONY_VERSION="dev-master"
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 phpstan/phpstan-phpunit --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;
elif [ "$SYMFONY_VERSION" != "" ]; then
composer remove symfony/symfony --dev &&
composer require symfony/symfony:"${SYMFONY_VERSION}" --dev --no-update;
else
composer update -n --prefer-dist;
fi;
script:
- 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;
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
echo "Tests with reporting in Clover format are skipped for older PHP versions";
composer run-tests;
else
composer run-tests-with-clover;
fi;
after_script:
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
echo "Coveralls report is skipped for older PHP versions";
else
bin/php-coveralls -v;
fi;