Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
f089a938
Unverified
Commit
f089a938
authored
Feb 29, 2020
by
Grégoire Paris
Committed by
GitHub
Feb 29, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3884 from greg0ire/use-docker-for-all-rdbms
Use Docker consistently
parents
514dddd8
6e505dec
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
90 additions
and
347 deletions
+90
-347
.scrutinizer.yml
.scrutinizer.yml
+1
-1
.travis.yml
.travis.yml
+47
-111
create-mysql-schema.sql
tests/travis/create-mysql-schema.sql
+0
-10
docker-run-mysql-or-mariadb.sh
tests/travis/docker-run-mysql-or-mariadb.sh
+42
-0
install-mariadb.sh
tests/travis/install-mariadb.sh
+0
-13
install-mysql-5.7.sh
tests/travis/install-mysql-5.7.sh
+0
-15
install-mysql-8.0.sh
tests/travis/install-mysql-8.0.sh
+0
-17
mariadb.mysqli.travis.xml
tests/travis/mariadb.mysqli.travis.xml
+0
-45
mariadb.travis.xml
tests/travis/mariadb.travis.xml
+0
-45
mysql.travis.xml
tests/travis/mysql.travis.xml
+0
-45
mysqli.travis.xml
tests/travis/mysqli.travis.xml
+0
-45
No files found.
.scrutinizer.yml
View file @
f089a938
...
...
@@ -21,7 +21,7 @@ before_commands:
tools
:
external_code_coverage
:
timeout
:
3600
runs
:
30
# 25
x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 2x ContinuousPHP
runs
:
28
# 23
x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 2x ContinuousPHP
filter
:
excluded_paths
:
...
...
.travis.yml
View file @
f089a938
...
...
@@ -14,7 +14,11 @@ before_install:
fi
before_script
:
-
if [[ "$DB" == "mysql" || "$DB" == "mysqli" || "$DB" == *"mariadb"* ]]; then mysql < tests/travis/create-mysql-schema.sql; fi;
-
|
if [[ -n "$IMAGE" ]]
then
bash ./tests/travis/docker-run-mysql-or-mariadb.sh
fi
install
:
-
travis_retry composer -n install --prefer-dist
...
...
@@ -53,36 +57,20 @@ jobs:
-
stage
:
Test
php
:
7.2
env
:
DB=mysql.docker MYSQL_VERSION=8.0
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
env
:
DB=mysql.docker IMAGE=mysql:8.0
-
stage
:
Test
php
:
7.2
env
:
DB=mysqli.docker MYSQL_VERSION=8.0
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
env
:
DB=mysqli.docker IMAGE=mysql:8.0
-
stage
:
Test
php
:
7.2
env
:
DB=mariadb MARIADB_VERSION=10.3
addons
:
mariadb
:
10.3
env
:
DB=mariadb.docker IMAGE=mariadb:10.3
-
stage
:
Test
php
:
7.2
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.3
addons
:
mariadb
:
10.3
env
:
DB=mariadb.mysqli.docker IMAGE=mariadb:10.3
-
stage
:
Test
php
:
7.2
env
:
DB=pgsql POSTGRESQL_VERSION=11.0
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-postgres-11.sh
-
stage
:
Test
...
...
@@ -92,8 +80,6 @@ jobs:
php
:
7.2
env
:
DB=sqlsrv
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-sqlsrv-dependencies.sh
-
bash ./tests/travis/install-mssql-sqlsrv.sh
...
...
@@ -102,84 +88,62 @@ jobs:
php
:
7.2
env
:
DB=pdo_sqlsrv
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-sqlsrv-dependencies.sh
-
bash ./tests/travis/install-mssql-pdo_sqlsrv.sh
-
bash ./tests/travis/install-mssql.sh
-
stage
:
Test
php
:
7.3
env
:
DB=mysql COVERAGE=yes
services
:
-
mysql
env
:
DB=mysql.docker IMAGE=mysql:5.7 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mysql.docker MYSQL_VERSION=5.7 COVERAGE=yes
sudo
:
required
before_script
:
-
bash ./tests/travis/install-mysql-5.7.sh
env
:
DB=mysql.docker IMAGE=mysql:8.0 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mysql.docker MYSQL_VERSION=8.0 COVERAGE=yes
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
env
:
DB=mysqli.docker IMAGE=mysql:5.7 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mysqli COVERAGE=yes
services
:
-
mysql
env
:
DB=mysqli.docker IMAGE=mysql:8.0 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mysqli.docker MYSQL_VERSION=5.7 COVERAGE=yes
sudo
:
required
before_script
:
-
bash ./tests/travis/install-mysql-5.7.sh
env
:
DB=mariadb.docker IMAGE=mariadb:10.0 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mysqli.docker MYSQL_VERSION=8.0 COVERAGE=yes
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
env
:
DB=mariadb.docker IMAGE=mariadb:10.1 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.docker MARIADB_VERSION=10.1 COVERAGE=yes
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
env
:
DB=mariadb.docker IMAGE=mariadb:10.2 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb MARIADB_VERSION=10.2 COVERAGE=yes
addons
:
mariadb
:
10.2
env
:
DB=mariadb.docker IMAGE=mariadb:10.3 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb MARIADB_VERSION=10.3 COVERAGE=yes
addons
:
mariadb
:
10.3
env
:
DB=mariadb.mysqli.docker IMAGE=mariadb:10.0 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.mysqli.docker MARIADB_VERSION=10.1 COVERAGE=yes
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
env
:
DB=mariadb.mysqli.docker IMAGE=mariadb:10.1 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.mysqli.docker IMAGE=mariadb:10.2 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.2 COVERAGE=yes
env
:
DB=mariadb.mysqli.docker IMAGE=mariadb:10.3 COVERAGE=yes
-
stage
:
Test
dist
:
trusty
php
:
7.3
env
:
DB=pgsql POSTGRESQL_VERSION=9.2 COVERAGE=yes
services
:
-
postgresql
addons
:
mariadb
:
10.2
postgresql
:
"
9.2"
-
stage
:
Test
dist
:
trusty
php
:
7.3
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.3 COVERAGE=yes
env
:
DB=pgsql POSTGRESQL_VERSION=9.3 COVERAGE=yes
services
:
-
postgresql
addons
:
mariadb
:
10.3
postgresql
:
"
9.3"
-
stage
:
Test
php
:
7.3
env
:
DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
...
...
@@ -207,16 +171,12 @@ jobs:
php
:
7.3
env
:
DB=pgsql POSTGRESQL_VERSION=11.0 COVERAGE=yes
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-postgres-11.sh
-
stage
:
Test
php
:
7.3
env
:
DB=sqlsrv COVERAGE=yes
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-sqlsrv-dependencies.sh
-
bash ./tests/travis/install-mssql-sqlsrv.sh
...
...
@@ -225,8 +185,6 @@ jobs:
php
:
7.3
env
:
DB=pdo_sqlsrv COVERAGE=yes
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-sqlsrv-dependencies.sh
-
bash ./tests/travis/install-mssql-pdo_sqlsrv.sh
...
...
@@ -235,8 +193,6 @@ jobs:
php
:
7.3
env
:
DB=ibm_db2 COVERAGE=yes
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-db2.sh
-
bash ./tests/travis/install-db2-ibm_db2.sh
...
...
@@ -246,58 +202,38 @@ jobs:
install
:
-
travis_retry composer update --prefer-dist --prefer-lowest
-
stage
:
Test
php
:
7.4snapshot
env
:
DB=mysql.docker MYSQL_VERSION=8.0
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
php
:
7.4
env
:
DB=mysql.docker IMAGE=mysql:8.0
-
stage
:
Test
php
:
7.4snapshot
env
:
DB=mysqli.docker MYSQL_VERSION=8.0
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
php
:
7.4
env
:
DB=mysqli.docker IMAGE=mysql:8.0
-
stage
:
Test
php
:
7.4snapshot
env
:
DB=mariadb MARIADB_VERSION=10.3
addons
:
mariadb
:
10.3
php
:
7.4
env
:
DB=mariadb.docker IMAGE=mariadb:10.3
-
stage
:
Test
php
:
7.4snapshot
env
:
DB=mariadb.mysqli MARIADB_VERSION=10.3
addons
:
mariadb
:
10.3
php
:
7.4
env
:
DB=mariadb.mysqli.docker IMAGE=mariadb:10.3
-
stage
:
Test
php
:
7.4
snapshot
php
:
7.4
env
:
DB=pgsql POSTGRESQL_VERSION=11.0
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-postgres-11.sh
-
stage
:
Test
php
:
7.4
snapshot
php
:
7.4
env
:
DB=sqlite
-
stage
:
Test
php
:
7.4
snapshot
php
:
7.4
env
:
DB=sqlsrv
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-sqlsrv-dependencies.sh
-
bash ./tests/travis/install-mssql-sqlsrv.sh
-
bash ./tests/travis/install-mssql.sh
-
stage
:
Test
php
:
7.4
snapshot
php
:
7.4
env
:
DB=pdo_sqlsrv
sudo
:
required
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-sqlsrv-dependencies.sh
-
bash ./tests/travis/install-mssql-pdo_sqlsrv.sh
...
...
tests/travis/create-mysql-schema.sql
deleted
100644 → 0
View file @
514dddd8
DROP
USER
IF
EXISTS
'travis'
@
'%'
;
CREATE
USER
'travis'
@
'%'
;
CREATE
SCHEMA
doctrine_tests
;
CREATE
SCHEMA
test_create_database
;
CREATE
SCHEMA
test_drop_database
;
GRANT
ALL
PRIVILEGES
ON
doctrine_tests
.
*
to
travis
@
'%'
;
GRANT
ALL
PRIVILEGES
ON
test_create_database
.
*
to
travis
@
'%'
;
GRANT
ALL
PRIVILEGES
ON
test_drop_database
.
*
to
travis
@
'%'
;
tests/travis/docker-run-mysql-or-mariadb.sh
0 → 100644
View file @
f089a938
#!/usr/bin/env bash
set
-ex
echo
"Starting RDBMS…"
>
&2
if
[[
"
$IMAGE
"
==
"mysql:8.0"
]]
then
CMD_OPTIONS
=
"--default-authentication-plugin=mysql_native_password"
else
CMD_OPTIONS
=
""
fi
docker run
\
--health-cmd
=
'mysqladmin ping --silent'
\
--detach
\
--env
MYSQL_ALLOW_EMPTY_PASSWORD
=
yes
\
--env
MYSQL_DATABASE
=
doctrine_tests
\
--publish
33306:3306
\
--name
rdbms
\
"
$IMAGE
"
$CMD_OPTIONS
while
true
;
do
healthStatus
=
$(
docker inspect
--format
"{{json .State.Health.Status }}"
rdbms
)
case
$healthStatus
in
'"starting"'
)
echo
"Waiting for RDBMS to become ready…"
>
&2
sleep
1
;;
'"healthy"'
)
echo
"Container is healthy"
>
&2
break
;;
'"unhealthy"'
)
echo
"Container is unhealthy"
>
&2
exit
1
;;
*
)
echo
"Unexpected health status
$healthStatus
"
>
&2
;;
esac
done
tests/travis/install-mariadb.sh
deleted
100644 → 0
View file @
514dddd8
#!/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'
tests/travis/install-mysql-5.7.sh
deleted
100644 → 0
View file @
514dddd8
#!/usr/bin/env bash
set
-ex
echo
"Starting MySQL 5.7..."
sudo
docker run
\
-d
\
-e
MYSQL_ALLOW_EMPTY_PASSWORD
=
yes
\
-e
MYSQL_DATABASE
=
doctrine_tests
\
-p
33306:3306
\
--name
mysql57
\
mysql:5.7
sudo
docker
exec
-i
mysql57 bash
<<<
'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done'
tests/travis/install-mysql-8.0.sh
deleted
100644 → 0
View file @
514dddd8
#!/usr/bin/env bash
set
-ex
echo
"Starting MySQL 8.0..."
sudo
docker pull mysql:8.0
sudo
docker run
\
-d
\
-e
MYSQL_ALLOW_EMPTY_PASSWORD
=
yes
\
-e
MYSQL_DATABASE
=
doctrine_tests
\
-p
33306:3306
\
--name
mysql80
\
mysql:8.0
\
--default-authentication-plugin
=
mysql_native_password
sudo
docker
exec
-i
mysql80 bash
<<<
'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done'
tests/travis/mariadb.mysqli.travis.xml
deleted
100644 → 0
View file @
514dddd8
<?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=
"localhost"
/>
<var
name=
"db_username"
value=
"travis"
/>
<var
name=
"db_password"
value=
""
/>
<var
name=
"db_name"
value=
"doctrine_tests"
/>
<var
name=
"db_port"
value=
"3306"
/>
<var
name=
"tmpdb_type"
value=
"mysqli"
/>
<var
name=
"tmpdb_host"
value=
"localhost"
/>
<var
name=
"tmpdb_username"
value=
"travis"
/>
<var
name=
"tmpdb_password"
value=
""
/>
<var
name=
"tmpdb_port"
value=
"3306"
/>
</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>
tests/travis/mariadb.travis.xml
deleted
100644 → 0
View file @
514dddd8
<?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=
"localhost"
/>
<var
name=
"db_username"
value=
"travis"
/>
<var
name=
"db_password"
value=
""
/>
<var
name=
"db_name"
value=
"doctrine_tests"
/>
<var
name=
"db_port"
value=
"3306"
/>
<var
name=
"tmpdb_type"
value=
"pdo_mysql"
/>
<var
name=
"tmpdb_host"
value=
"localhost"
/>
<var
name=
"tmpdb_username"
value=
"travis"
/>
<var
name=
"tmpdb_password"
value=
""
/>
<var
name=
"tmpdb_port"
value=
"3306"
/>
</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>
tests/travis/mysql.travis.xml
deleted
100644 → 0
View file @
514dddd8
<?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=
"localhost"
/>
<var
name=
"db_username"
value=
"travis"
/>
<var
name=
"db_password"
value=
""
/>
<var
name=
"db_name"
value=
"doctrine_tests"
/>
<var
name=
"db_port"
value=
"3306"
/>
<var
name=
"tmpdb_type"
value=
"pdo_mysql"
/>
<var
name=
"tmpdb_host"
value=
"localhost"
/>
<var
name=
"tmpdb_username"
value=
"travis"
/>
<var
name=
"tmpdb_password"
value=
""
/>
<var
name=
"tmpdb_port"
value=
"3306"
/>
</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>
tests/travis/mysqli.travis.xml
deleted
100644 → 0
View file @
514dddd8
<?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=
"localhost"
/>
<var
name=
"db_username"
value=
"travis"
/>
<var
name=
"db_password"
value=
""
/>
<var
name=
"db_name"
value=
"doctrine_tests"
/>
<var
name=
"db_port"
value=
"3306"
/>
<var
name=
"tmpdb_type"
value=
"mysqli"
/>
<var
name=
"tmpdb_host"
value=
"localhost"
/>
<var
name=
"tmpdb_username"
value=
"travis"
/>
<var
name=
"tmpdb_password"
value=
""
/>
<var
name=
"tmpdb_port"
value=
"3306"
/>
</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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment