Skip to content

Commit ebc4a99

Browse files
committed
PHPLIB-460: Use travis build stages
http://jira.mongodb.org/browse/PHPLIB-460 With these changes, we're preparing the build file to do more than just running tests. To make feedback more immediate and to save resources, the build now runs a smoke screen testing step before running the full build pipeline. This should catch simple errors and will also do static analysis before running all tests. Once smoke screen testing has completed, the full build pipeline will be executed. This PR also adds testing against PHP 7.4 with the build currently failing due to a deprecation: ``` Function ReflectionType::__toString() is deprecated /home/travis/build/alcaeus/mongo-php-library/tests/Operation/ExplainTest.php:17 ``` This will be fixed at a later step once I've figured out what's causing this.
2 parents 039a694 + f213522 commit ebc4a99

File tree

1 file changed

+55
-20
lines changed

1 file changed

+55
-20
lines changed

.travis.yml

Lines changed: 55 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -18,52 +18,87 @@ env:
1818
- SERVER_DISTRO=ubuntu1604
1919
- SERVER_VERSION=4.0.10
2020
- DEPLOYMENT=STANDALONE
21+
- COMPOSER_OPTIONS=
22+
23+
jobs:
24+
allow_failures:
25+
- php: "7.4snapshot"
2126

22-
matrix:
23-
fast_finish: true
2427
include:
25-
- php: 5.6
26-
- php: 7.0
27-
- php: 7.1
28-
- php: 7.2
29-
- php: 7.3
30-
- php: 7.0
28+
29+
- stage: Smoke Testing
30+
php: "7.3"
31+
32+
# Test remaining supported PHP versions
33+
- stage: Test
34+
php: "5.6"
35+
- stage: Test
36+
php: "7.0"
37+
- stage: Test
38+
php: "7.1"
39+
- stage: Test
40+
php: "7.2"
41+
- stage: Test
42+
php: "7.4snapshot"
43+
44+
# Test against lowest supported dependencies
45+
- stage: Test
46+
php: "5.6"
47+
env:
48+
- COMPOSER_OPTIONS=--prefer-lowest
49+
50+
# Test older standalone server versions (3.0-3.6)
51+
- stage: Test
52+
php: "7.0"
3153
dist: trusty
3254
env:
3355
- SERVER_DISTRO=ubuntu1404
3456
- SERVER_VERSION=3.0.15
3557
- DEPLOYMENT=STANDALONE_OLD
36-
- php: 7.0
58+
- stage: Test
59+
php: "7.0"
3760
env:
3861
- SERVER_VERSION=3.2.22
3962
- DEPLOYMENT=STANDALONE_OLD
40-
- php: 7.0
63+
- stage: Test
64+
php: "7.0"
4165
env:
4266
- SERVER_VERSION=3.4.21
4367
- DEPLOYMENT=STANDALONE_OLD
44-
- php: 7.0
68+
- stage: Test
69+
php: "7.0"
4570
env:
4671
- SERVER_VERSION=3.6.13
47-
- php: 7.3
72+
73+
# Test other server configurations
74+
- stage: Test
75+
php: "7.3"
4876
env:
4977
- DEPLOYMENT=STANDALONE_AUTH
50-
- php: 7.3
78+
- stage: Test
79+
php: "7.3"
5180
env:
5281
- DEPLOYMENT=STANDALONE_SSL
53-
- php: 7.3
82+
- stage: Test
83+
php: "7.3"
5484
env:
5585
- SERVER_VERSION=3.6.13
5686
- DEPLOYMENT=REPLICASET
57-
- php: 7.3
87+
- stage: Test
88+
php: "7.3"
5889
env:
5990
- DEPLOYMENT=REPLICASET
60-
- php: 7.3
91+
- stage: Test
92+
php: "7.3"
93+
env:
94+
- DEPLOYMENT=SHARDED_CLUSTER
95+
96+
# Test upcoming server versions
97+
- stage: Test
98+
php: "7.3"
6199
env:
62100
- SERVER_VERSION=4.2.0-rc1
63101
- DEPLOYMENT=REPLICASET
64-
- php: 7.3
65-
env:
66-
- DEPLOYMENT=SHARDED_CLUSTER
67102

68103
before_install:
69104
- pip install "mongo-orchestration>=0.6.7,<1.0" --user `whoami`
@@ -96,7 +131,7 @@ before_script:
96131
- .travis/setup_mo.sh
97132
- pecl install -f mongodb-${DRIVER_VERSION}
98133
- php --ri mongodb
99-
- composer install --no-interaction --no-progress --no-suggest
134+
- composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-stable ${COMPOSER_OPTIONS}
100135
- ulimit -c
101136
- ulimit -c unlimited -S
102137

0 commit comments

Comments
 (0)