Skip to content

Commit

Permalink
Merge pull request #3883 from greg0ire/troubleshoot-apt-issue
Browse files Browse the repository at this point in the history
Fix broken build
  • Loading branch information
greg0ire authored Feb 28, 2020
2 parents 96cda30 + 5c858c4 commit 96d10bd
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 44 deletions.
57 changes: 16 additions & 41 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: php
sudo: false
dist: trusty
dist: xenial

cache:
directories:
Expand Down Expand Up @@ -112,6 +111,8 @@ jobs:
- stage: Test
php: 7.3
env: DB=mysql COVERAGE=yes
services:
- mysql
- stage: Test
php: 7.3
env: DB=mysql.docker MYSQL_VERSION=5.7 COVERAGE=yes
Expand All @@ -129,6 +130,8 @@ jobs:
- stage: Test
php: 7.3
env: DB=mysqli COVERAGE=yes
services:
- mysql
- stage: Test
php: 7.3
env: DB=mysqli.docker MYSQL_VERSION=5.7 COVERAGE=yes
Expand All @@ -145,14 +148,11 @@ jobs:
- bash ./tests/travis/install-mysql-8.0.sh
- stage: Test
php: 7.3
env: DB=mariadb MARIADB_VERSION=10.0 COVERAGE=yes
addons:
mariadb: 10.0
- stage: Test
php: 7.3
env: DB=mariadb MARIADB_VERSION=10.1 COVERAGE=yes
addons:
mariadb: 10.1
env: DB=mariadb.docker MARIADB_VERSION=10.1 COVERAGE=yes
services:
- docker
before_script:
- bash ./tests/travis/install-mariadb.sh
- stage: Test
php: 7.3
env: DB=mariadb MARIADB_VERSION=10.2 COVERAGE=yes
Expand All @@ -165,14 +165,11 @@ jobs:
mariadb: 10.3
- stage: Test
php: 7.3
env: DB=mariadb.mysqli MARIADB_VERSION=10.0 COVERAGE=yes
addons:
mariadb: 10.0
- stage: Test
php: 7.3
env: DB=mariadb.mysqli MARIADB_VERSION=10.1 COVERAGE=yes
addons:
mariadb: 10.1
env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.1 COVERAGE=yes
services:
- docker
before_script:
- bash ./tests/travis/install-mariadb.sh
- stage: Test
php: 7.3
env: DB=mariadb.mysqli MARIADB_VERSION=10.2 COVERAGE=yes
Expand All @@ -183,49 +180,27 @@ jobs:
env: DB=mariadb.mysqli MARIADB_VERSION=10.3 COVERAGE=yes
addons:
mariadb: 10.3
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=9.2 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.2"
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=9.3 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.3"
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.4"
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=9.5 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.5"
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.6"
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=10.0 COVERAGE=yes
sudo: required
services:
- postgresql
addons:
postgresql: "9.6"
postgresql: "10"
before_script:
- bash ./tests/travis/install-postgres-10.sh
- stage: Test
Expand Down
3 changes: 3 additions & 0 deletions tests/travis/create-mysql-schema.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
DROP USER IF EXISTS 'travis'@'%';
CREATE USER 'travis'@'%';

CREATE SCHEMA doctrine_tests;
CREATE SCHEMA test_create_database;
CREATE SCHEMA test_drop_database;
Expand Down
13 changes: 13 additions & 0 deletions tests/travis/install-mariadb.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env bash

set -ex

sudo docker run \
-d \
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes \
-e MYSQL_DATABASE=doctrine_tests \
-p 33306:3306 \
--name mariadb \
mariadb:${MARIADB_VERSION}

sudo docker exec -i mariadb bash <<< 'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done'
2 changes: 1 addition & 1 deletion tests/travis/install-sqlsrv-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ set -ex
echo Installing driver dependencies

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql.list
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql.list
sudo apt-get update
ACCEPT_EULA=Y sudo apt-get install -qy msodbcsql17 unixodbc unixodbc-dev libssl1.0.0
45 changes: 45 additions & 0 deletions tests/travis/mariadb.docker.travis.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />

<var name="db_type" value="pdo_mysql"/>
<var name="db_host" value="127.0.0.1" />
<var name="db_username" value="root" />
<var name="db_password" value="" />
<var name="db_name" value="doctrine_tests" />
<var name="db_port" value="33306"/>

<var name="tmpdb_type" value="pdo_mysql"/>
<var name="tmpdb_host" value="127.0.0.1" />
<var name="tmpdb_username" value="root" />
<var name="tmpdb_password" value="" />
<var name="tmpdb_port" value="33306"/>
</php>

<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
</whitelist>
</filter>

<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
45 changes: 45 additions & 0 deletions tests/travis/mariadb.mysqli.docker.travis.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
failOnWarning="true"
>
<php>
<ini name="error_reporting" value="-1" />

<var name="db_type" value="mysqli"/>
<var name="db_host" value="127.0.0.1" />
<var name="db_username" value="root" />
<var name="db_password" value="" />
<var name="db_name" value="doctrine_tests" />
<var name="db_port" value="33306"/>

<var name="tmpdb_type" value="mysqli"/>
<var name="tmpdb_host" value="127.0.0.1" />
<var name="tmpdb_username" value="root" />
<var name="tmpdb_password" value="" />
<var name="tmpdb_port" value="33306"/>
</php>

<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory suffix=".php">../../lib/Doctrine</directory>
</whitelist>
</filter>

<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
2 changes: 0 additions & 2 deletions tests/travis/mariadb.mysqli.travis.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
bootstrap="../../vendor/autoload.php"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
Expand Down Expand Up @@ -44,4 +43,3 @@
</exclude>
</groups>
</phpunit>

0 comments on commit 96d10bd

Please sign in to comment.