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
e7aef4e8
Unverified
Commit
e7aef4e8
authored
Feb 29, 2020
by
Grégoire Paris
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refactor MySQL and MariaDB run in a single script
parent
765432ad
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
133 deletions
+65
-133
.travis.yml
.travis.yml
+23
-63
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
-18
install-mysql-5.7.sh
tests/travis/install-mysql-5.7.sh
+0
-20
install-mysql-8.0.sh
tests/travis/install-mysql-8.0.sh
+0
-22
No files found.
.travis.yml
View file @
e7aef4e8
...
...
@@ -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,34 +57,24 @@ jobs:
-
stage
:
Test
php
:
7.2
env
:
DB=mysql.docker MYSQL_VERSION=8.0
sudo
:
required
env
:
DB=mysql.docker IMAGE=mysql:8.0
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
-
stage
:
Test
php
:
7.2
env
:
DB=mysqli.docker MYSQL_VERSION=8.0
sudo
:
required
env
:
DB=mysqli.docker IMAGE=mysql:8.0
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
-
stage
:
Test
php
:
7.2
env
:
DB=mariadb.docker
MARIADB_VERSION=
10.3
env
:
DB=mariadb.docker
IMAGE=mariadb:
10.3
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
-
stage
:
Test
php
:
7.2
env
:
DB=mariadb.mysqli.docker
MARIADB_VERSION=
10.3
env
:
DB=mariadb.mysqli.docker
IMAGE=mariadb:
10.3
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
-
stage
:
Test
php
:
7.2
env
:
DB=pgsql POSTGRESQL_VERSION=11.0
...
...
@@ -114,74 +108,50 @@ jobs:
-
bash ./tests/travis/install-mssql.sh
-
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:5.7 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mysql.docker MYSQL_VERSION=8.0 COVERAGE=yes
sudo
:
required
env
:
DB=mysql.docker IMAGE=mysql:8.0 COVERAGE=yes
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
-
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=mysqli.docker IMAGE=mysql:5.7 COVERAGE=yes
-
stage
:
Test
php
:
7.3
env
:
DB=mysqli.docker MYSQL_VERSION=8.0 COVERAGE=yes
sudo
:
required
env
:
DB=mysqli.docker IMAGE=mysql:8.0 COVERAGE=yes
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.docker
MARIADB_VERSION=
10.1 COVERAGE=yes
env
:
DB=mariadb.docker
IMAGE=mariadb:
10.1 COVERAGE=yes
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.docker
MARIADB_VERSION=
10.2 COVERAGE=yes
env
:
DB=mariadb.docker
IMAGE=mariadb:
10.2 COVERAGE=yes
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.docker
MARIADB_VERSION=
10.3 COVERAGE=yes
env
:
DB=mariadb.docker
IMAGE=mariadb:
10.3 COVERAGE=yes
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.mysqli.docker
MARIADB_VERSION=
10.1 COVERAGE=yes
env
:
DB=mariadb.mysqli.docker
IMAGE=mariadb:
10.1 COVERAGE=yes
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.mysqli.docker
MARIADB_VERSION=
10.2 COVERAGE=yes
env
:
DB=mariadb.mysqli.docker
IMAGE=mariadb:
10.2 COVERAGE=yes
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
-
stage
:
Test
php
:
7.3
env
:
DB=mariadb.mysqli.docker
MARIADB_VERSION=
10.3 COVERAGE=yes
env
:
DB=mariadb.mysqli.docker
IMAGE=mariadb:
10.3 COVERAGE=yes
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
-
stage
:
Test
php
:
7.3
env
:
DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
...
...
@@ -249,34 +219,24 @@ jobs:
-
travis_retry composer update --prefer-dist --prefer-lowest
-
stage
:
Test
php
:
7.4
env
:
DB=mysql.docker MYSQL_VERSION=8.0
sudo
:
required
env
:
DB=mysql.docker IMAGE=mysql:8.0
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
-
stage
:
Test
php
:
7.4
env
:
DB=mysqli.docker MYSQL_VERSION=8.0
sudo
:
required
env
:
DB=mysqli.docker IMAGE=mysql:8.0
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mysql-8.0.sh
-
stage
:
Test
php
:
7.4
env
:
DB=mariadb.docker
MARIADB_VERSION=
10.3
env
:
DB=mariadb.docker
IMAGE=mariadb:
10.3
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
-
stage
:
Test
php
:
7.4
env
:
DB=mariadb.mysqli.docker
MARIADB_VERSION=
10.3
env
:
DB=mariadb.mysqli.docker
IMAGE=mariadb:
10.3
services
:
-
docker
before_script
:
-
bash ./tests/travis/install-mariadb.sh
-
stage
:
Test
php
:
7.4
env
:
DB=pgsql POSTGRESQL_VERSION=11.0
...
...
tests/travis/create-mysql-schema.sql
deleted
100644 → 0
View file @
765432ad
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 @
e7aef4e8
#!/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 @
765432ad
#!/usr/bin/env bash
set
-ex
sudo
docker run
\
--health-cmd
=
'mysqladmin ping --silent'
\
-d
\
-e
MYSQL_ALLOW_EMPTY_PASSWORD
=
yes
\
-e
MYSQL_DATABASE
=
doctrine_tests
\
-p
33306:3306
\
--name
mariadb
\
mariadb:
${
MARIADB_VERSION
}
until
[
"
$(
sudo
docker inspect
--format
"{{json .State.Health.Status }}"
mariadb
)
"
==
"
\"
healthy
\"
"
]
do
echo
"Waiting for MariaDB to become ready…"
sleep
1
done
tests/travis/install-mysql-5.7.sh
deleted
100644 → 0
View file @
765432ad
#!/usr/bin/env bash
set
-ex
echo
"Starting MySQL 5.7..."
sudo
docker run
\
--health-cmd
=
'mysqladmin ping --silent'
\
-d
\
-e
MYSQL_ALLOW_EMPTY_PASSWORD
=
yes
\
-e
MYSQL_DATABASE
=
doctrine_tests
\
-p
33306:3306
\
--name
mysql57
\
mysql:5.7
until
[
"
$(
sudo
docker inspect
--format
"{{json .State.Health.Status }}"
mysql57
)
"
==
"
\"
healthy
\"
"
]
do
echo
"Waiting for MySQL to become ready…"
sleep
1
done
tests/travis/install-mysql-8.0.sh
deleted
100644 → 0
View file @
765432ad
#!/usr/bin/env bash
set
-ex
echo
"Starting MySQL 8.0..."
sudo
docker pull mysql:8.0
sudo
docker run
\
--health-cmd
=
'mysqladmin ping --silent'
\
-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
until
[
"
$(
sudo
docker inspect
--format
"{{json .State.Health.Status }}"
mysql80
)
"
==
"
\"
healthy
\"
"
]
do
echo
"Waiting for MySQL to become ready…"
sleep
1
done
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