-
Notifications
You must be signed in to change notification settings - Fork 265
/
Copy path.travis.yml
165 lines (148 loc) · 3.75 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
language: php
dist: xenial
addons:
apt:
packages:
- gdb
- libcurl3
- libgssapi-krb5-2
- libkrb5-dbg
- libldap-2.4-2
- libpcap0.8
- libsasl2-2
- snmp
- openssl
cache:
directories:
- ${HOME}/.cache/pip
- ${HOME}/.composer/cache/files
- ${HOME}/php-ext
env:
global:
- DRIVER_VERSION=1.7.0
- SERVER_DISTRO=enterprise-ubuntu1604
- SERVER_VERSION=4.2.0
- DEPLOYMENT=STANDALONE
- COMPOSER_OPTIONS=
jobs:
include:
- stage: Smoke Testing
php: "7.3"
env:
- CHECKS=phpunit
- stage: Smoke Testing
php: "7.1"
before_install: []
before_script:
- .travis/install-extension.sh
- composer require --no-update doctrine/coding-standard=^6.0
- composer install --no-interaction --no-progress --no-suggest ${COMPOSER_OPTIONS}
script: vendor/bin/phpcs
after_script: []
after_failure: []
env:
- CHECKS=phpcs
# Test remaining supported PHP versions
- stage: Test
php: "5.6"
- stage: Test
php: "7.0"
- stage: Test
php: "7.1"
- stage: Test
php: "7.2"
- stage: Test
php: "7.4"
# Test against lowest supported dependencies
- stage: Test
php: "5.6"
env:
- COMPOSER_OPTIONS=--prefer-lowest
# Test older standalone server versions (3.0-4.0)
- stage: Test
php: "7.0"
dist: trusty
env:
- SERVER_DISTRO=enterprise-ubuntu1404
- SERVER_VERSION=3.0.15
- DEPLOYMENT=STANDALONE_OLD
- stage: Test
php: "7.0"
env:
- SERVER_VERSION=3.2.22
- DEPLOYMENT=STANDALONE_OLD
- stage: Test
php: "7.0"
env:
- SERVER_VERSION=3.4.21
- DEPLOYMENT=STANDALONE_OLD
- stage: Test
php: "7.0"
env:
- SERVER_VERSION=3.6.13
- stage: Test
php: "7.3"
env:
- SERVER_VERSION=4.0.12
# Test other server configurations
- stage: Test
php: "7.3"
env:
- DEPLOYMENT=STANDALONE_AUTH
- stage: Test
php: "7.3"
env:
- DEPLOYMENT=STANDALONE_SSL
- stage: Test
php: "7.3"
env:
- SERVER_VERSION=3.6.13
- DEPLOYMENT=REPLICASET
- stage: Test
php: "7.3"
env:
- DEPLOYMENT=REPLICASET
- stage: Test
php: "7.3"
env:
- DEPLOYMENT=SHARDED_CLUSTER
- stage: Test
php: "7.3"
env:
- DEPLOYMENT=SHARDED_CLUSTER_RS
# Test next patch release for driver
- stage: Test
php: "7.3"
env:
- DRIVER_BRANCH="v1.7"
# Test next minor release for driver
- stage: Test
php: "7.3"
env:
- DRIVER_BRANCH="master"
before_install:
- pip install "mongo-orchestration>=0.6.7,<1.0" --user `whoami`
- export SERVER_FILENAME=mongodb-linux-x86_64-${SERVER_DISTRO}-${SERVER_VERSION}
- wget -qO- https://downloads.mongodb.com/linux/${SERVER_FILENAME}.tgz | tar xz
- export PATH=${PWD}/${SERVER_FILENAME}/bin:${PATH}
- mongod --version
- mongo-orchestration --version
- export MO_PATH=`python -c 'import mongo_orchestration; from os import path; print(path.dirname(mongo_orchestration.__file__));'`
before_script:
- mongo-orchestration start
- .travis/setup_mo.sh
- .travis/install-extension.sh
- php --ri mongodb
- composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-stable ${COMPOSER_OPTIONS}
- ulimit -c
- ulimit -c unlimited -S
script:
- export MONGODB_URI=`cat /tmp/uri.txt`
- echo $MONGODB_URI
- vendor/bin/phpunit -v
before_cache:
- rm -f ${HOME}/.cache/pip/log/debug.log
after_failure:
- find . -name 'core*' -exec ${TRAVIS_BUILD_DIR}/.travis/debug-core.sh {} \;
after_script:
- mongo-orchestration stop