-
Notifications
You must be signed in to change notification settings - Fork 55
/
Copy path.travis.yml
48 lines (41 loc) · 1.26 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
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
matrix:
include:
- php: 7.1
- php: 7.1
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
- php: 7.2
- php: 7.2
env: COMPOSER_MINIMUM_STABILITY=beta
- php: 7.2
env: COMPOSER_MINIMUM_STABILITY=dev
- php: nightly
allow_failures:
# Allow failures for unstable builds.
- php: nightly
- env: COMPOSER_MINIMUM_STABILITY=dev
- env: COMPOSER_MINIMUM_STABILITY=beta
before_install:
- phpenv config-rm xdebug.ini || echo "xdebug not available"
- composer global require --dev 'friendsofphp/php-cs-fixer:^2.11'
- export PATH="$PATH:$HOME/.composer/vendor/bin"
install:
- |
# Handle composer stability to ensure code is validated against all the versions
case "$COMPOSER_MINIMUM_STABILITY" in
dev|alpha|beta|rc|stable)
echo "Update stability requirement during the build to $COMPOSER_MINIMUM_STABILITY."
composer config minimum-stability $COMPOSER_MINIMUM_STABILITY
;;
*)
echo "Use the stability defined in composer.json"
;;
esac
- composer update ${COMPOSER_FLAGS} --no-progress --no-suggest --ansi
script:
- php-cs-fixer fix --dry-run --diff --no-ansi
- vendor/bin/phpunit