forked from dvdoug/BoxPacker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (52 loc) · 1.29 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
language: php
env:
- TEST_SUITE=unit
- TEST_SUITE=functional
- TEST_SUITE=efficiency
php:
- 7.4
- 7.3
- 7.2
- 7.1
matrix:
include:
- php: nightly
env: FORCE_LATEST=1
- php: 7.1
env: PREFER_LOWEST=1
- php: 7.2
env: CSFIXER=1
allow_failures:
- php: nightly
cache:
directories:
- $HOME/.composer/cache
- $HOME/.cache/composer
install:
- phpenv config-rm xdebug.ini || true;
- composer validate --strict;
- |
sed -i 's/"bin-compat" : "full"/"bin-compat" : "auto"/g' composer.json;
- |
if [ "$PREFER_LOWEST" = "1" ]; then
composer update --prefer-lowest;
elif [ "$FORCE_LATEST" = "1" ]; then
composer update --ignore-platform-reqs;
else
composer update;
fi;
- phpenv config-add travis-php.ini;
script:
- |
if [ "$CSFIXER" = "1" ]; then
vendor/bin/php-cs-fixer fix --verbose --dry-run --diff --diff-format=udiff --allow-risky=yes;
elif [ "${TEST_SUITE}" = "unit" ]; then
php vendor/bin/phpunit --exclude-group efficiency;
elif [ "${TEST_SUITE}" = "efficiency" ]; then
php vendor/bin/phpunit --group efficiency;
elif [ "${TEST_SUITE}" = "functional" ]; then
php vendor/bin/behat --strict;
else
php vendor/bin/behat --strict;
php vendor/bin/phpunit;
fi;