Skip to content

Commit ff45eda

Browse files
committed
Switching Travis CI builds to Ubuntu Xenial Xerus
1 parent 3b13a7e commit ff45eda

File tree

7 files changed

+123
-19
lines changed

7 files changed

+123
-19
lines changed

.travis.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
language: php
22
sudo: false
3-
dist: trusty
3+
dist: xenial
44

55
cache:
66
directories:
@@ -175,6 +175,8 @@ jobs:
175175
- stage: Test
176176
php: 7.4
177177
env: DB=mysql COVERAGE=yes
178+
services:
179+
- mysql
178180
- stage: Test
179181
php: 7.4
180182
env: DB=mysql.docker MYSQL_VERSION=5.7 COVERAGE=yes
@@ -192,6 +194,8 @@ jobs:
192194
- stage: Test
193195
php: 7.4
194196
env: DB=mysqli COVERAGE=yes
197+
services:
198+
- mysql
195199
- stage: Test
196200
php: 7.4
197201
env: DB=mysqli.docker MYSQL_VERSION=5.7 COVERAGE=yes
@@ -208,9 +212,11 @@ jobs:
208212
- bash ./tests/travis/install-mysql-8.0.sh
209213
- stage: Test
210214
php: 7.4
211-
env: DB=mariadb MARIADB_VERSION=10.1 COVERAGE=yes
212-
addons:
213-
mariadb: 10.1
215+
env: DB=mariadb.docker MARIADB_VERSION=10.1 COVERAGE=yes
216+
services:
217+
- docker
218+
before_script:
219+
- bash ./tests/travis/install-mariadb.sh
214220
- stage: Test
215221
php: 7.4
216222
env: DB=mariadb MARIADB_VERSION=10.2 COVERAGE=yes
@@ -223,9 +229,11 @@ jobs:
223229
mariadb: 10.3
224230
- stage: Test
225231
php: 7.4
226-
env: DB=mariadb.mysqli MARIADB_VERSION=10.1 COVERAGE=yes
227-
addons:
228-
mariadb: 10.1
232+
env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.1 COVERAGE=yes
233+
services:
234+
- docker
235+
before_script:
236+
- bash ./tests/travis/install-mariadb.sh
229237
- stage: Test
230238
php: 7.4
231239
env: DB=mariadb.mysqli MARIADB_VERSION=10.2 COVERAGE=yes
@@ -239,32 +247,24 @@ jobs:
239247
- stage: Test
240248
php: 7.4
241249
env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
242-
services:
243-
- postgresql
244250
addons:
245251
postgresql: "9.4"
246252
- stage: Test
247253
php: 7.4
248254
env: DB=pgsql POSTGRESQL_VERSION=9.5 COVERAGE=yes
249-
services:
250-
- postgresql
251255
addons:
252256
postgresql: "9.5"
253257
- stage: Test
254258
php: 7.4
255259
env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes
256-
services:
257-
- postgresql
258260
addons:
259261
postgresql: "9.6"
260262
- stage: Test
261263
php: 7.4
262264
env: DB=pgsql POSTGRESQL_VERSION=10.0 COVERAGE=yes
263265
sudo: required
264-
services:
265-
- postgresql
266266
addons:
267-
postgresql: "10.0"
267+
postgresql: "10"
268268
before_script:
269269
- bash ./tests/travis/install-postgres-10.sh
270270
- stage: Test

tests/travis/create-mysql-schema.sql

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
DROP USER IF EXISTS 'travis'@'%';
2+
CREATE USER 'travis'@'%';
3+
14
CREATE SCHEMA doctrine_tests;
25
CREATE SCHEMA test_create_database;
36
CREATE SCHEMA test_drop_database;

tests/travis/install-mariadb.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
3+
set -ex
4+
5+
sudo docker run \
6+
-d \
7+
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes \
8+
-e MYSQL_DATABASE=doctrine_tests \
9+
-p 33306:3306 \
10+
--name mariadb \
11+
mariadb:${MARIADB_VERSION}
12+
13+
sudo docker exec -i mariadb bash <<< 'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done'

tests/travis/install-sqlsrv-dependencies.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ set -ex
55
echo Installing driver dependencies
66

77
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
8-
curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql.list
8+
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql.list
99
sudo apt-get update
1010
ACCEPT_EULA=Y sudo apt-get install -qy msodbcsql17 unixodbc unixodbc-dev libssl1.0.0
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/phpunit.xsd"
4+
colors="true"
5+
beStrictAboutOutputDuringTests="true"
6+
beStrictAboutTodoAnnotatedTests="true"
7+
failOnRisky="true"
8+
failOnWarning="true"
9+
>
10+
<php>
11+
<ini name="error_reporting" value="-1" />
12+
13+
<var name="db_type" value="pdo_mysql"/>
14+
<var name="db_host" value="127.0.0.1" />
15+
<var name="db_username" value="root" />
16+
<var name="db_password" value="" />
17+
<var name="db_name" value="doctrine_tests" />
18+
<var name="db_port" value="33306"/>
19+
20+
<var name="tmpdb_type" value="pdo_mysql"/>
21+
<var name="tmpdb_host" value="127.0.0.1" />
22+
<var name="tmpdb_username" value="root" />
23+
<var name="tmpdb_password" value="" />
24+
<var name="tmpdb_port" value="33306"/>
25+
</php>
26+
27+
<testsuites>
28+
<testsuite name="Doctrine DBAL Test Suite">
29+
<directory>../Doctrine/Tests/DBAL</directory>
30+
</testsuite>
31+
</testsuites>
32+
33+
<filter>
34+
<whitelist>
35+
<directory suffix=".php">../../lib/Doctrine</directory>
36+
</whitelist>
37+
</filter>
38+
39+
<groups>
40+
<exclude>
41+
<group>performance</group>
42+
<group>locking_functional</group>
43+
</exclude>
44+
</groups>
45+
</phpunit>
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/phpunit.xsd"
4+
colors="true"
5+
beStrictAboutOutputDuringTests="true"
6+
beStrictAboutTodoAnnotatedTests="true"
7+
failOnRisky="true"
8+
failOnWarning="true"
9+
>
10+
<php>
11+
<ini name="error_reporting" value="-1" />
12+
13+
<var name="db_type" value="mysqli"/>
14+
<var name="db_host" value="127.0.0.1" />
15+
<var name="db_username" value="root" />
16+
<var name="db_password" value="" />
17+
<var name="db_name" value="doctrine_tests" />
18+
<var name="db_port" value="33306"/>
19+
20+
<var name="tmpdb_type" value="mysqli"/>
21+
<var name="tmpdb_host" value="127.0.0.1" />
22+
<var name="tmpdb_username" value="root" />
23+
<var name="tmpdb_password" value="" />
24+
<var name="tmpdb_port" value="33306"/>
25+
</php>
26+
27+
<testsuites>
28+
<testsuite name="Doctrine DBAL Test Suite">
29+
<directory>../Doctrine/Tests/DBAL</directory>
30+
</testsuite>
31+
</testsuites>
32+
33+
<filter>
34+
<whitelist>
35+
<directory suffix=".php">../../lib/Doctrine</directory>
36+
</whitelist>
37+
</filter>
38+
39+
<groups>
40+
<exclude>
41+
<group>performance</group>
42+
<group>locking_functional</group>
43+
</exclude>
44+
</groups>
45+
</phpunit>

tests/travis/mariadb.mysqli.travis.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/phpunit.xsd"
44
colors="true"
5-
bootstrap="../../vendor/autoload.php"
65
beStrictAboutOutputDuringTests="true"
76
beStrictAboutTodoAnnotatedTests="true"
87
failOnRisky="true"
@@ -44,4 +43,3 @@
4443
</exclude>
4544
</groups>
4645
</phpunit>
47-

0 commit comments

Comments
 (0)