This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 64
/
Copy path.travis.yml
91 lines (82 loc) · 2.7 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
89
90
91
sudo: false
language: php
services:
- mongodb
cache:
directories:
- $HOME/.composer/cache
env:
global:
- COMPOSER_ARGS="--no-interaction"
matrix:
fast_finish: true
include:
- php: 5.6
env:
- DEPS=lowest
- ENABLE_EXT_MONGO=true
- php: 5.6
env:
- DEPS=locked
- ENABLE_EXT_MONGO=true
- ALTERNATE_DEPS="phpunit/phpunit zendframework/zend-code zendframework/zend-permissions-rbac zendframework/zend-hydrator zfcampus/zf-oauth2"
- php: 5.6
env:
- DEPS=latest
- ENABLE_EXT_MONGO=true
- php: 7
env:
- DEPS=lowest
- ENABLE_EXT_MONGODB=true
- php: 7
env:
- DEPS=locked
- ALTERNATE_DEPS="phpunit/phpunit zendframework/zend-code zendframework/zend-permissions-rbac zendframework/zend-hydrator"
- ENABLE_EXT_MONGODB=true
- CS_CHECK=true
- php: 7
env:
- DEPS=latest
- ENABLE_EXT_MONGODB=true
- php: 7.1
env:
- DEPS=lowest
- ENABLE_EXT_MONGODB=true
- php: 7.1
env:
- DEPS=locked
- ALTERNATE_DEPS="zendframework/zend-hydrator"
- ENABLE_EXT_MONGODB=true
- php: 7.1
env:
- DEPS=latest
- ENABLE_EXT_MONGODB=true
- php: 7.2
env:
- DEPS=lowest
- ENABLE_EXT_MONGODB=true
- php: 7.2
env:
- DEPS=locked
- ENABLE_EXT_MONGODB=true
- php: 7.2
env:
- DEPS=latest
- ENABLE_EXT_MONGODB=true
notifications:
email: false
before_install:
- echo "TRAVIS_PHP_VERSION is '$TRAVIS_PHP_VERSION'"
- if [[ $TEST_COVERAGE != 'true' && "$(php --version | grep xdebug -ci)" -ge 1 ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- if [[ $ENABLE_EXT_MONGO == 'true' ]]; then echo "Enabling mongo extension"; echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
- if [[ $ENABLE_EXT_MONGODB == 'true' ]]; then echo "Enabling mongodb extension"; echo "extension = mongodb.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini ; fi
install:
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
- if [[ $ALTERNATE_DEPS != '' ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $ALTERNATE_DEPS ; fi
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- if [[ $EXT_MONGODB == 'true' ]]; then composer require --dev $COMPOSER_ARGS alcaeus/mongo-php-adapter ; fi
- stty cols 120 && composer show
script:
- composer test
- if [[ $CS_CHECK == 'true' ]]; then composer cs-check ; fi