Unverified Commit b9d7a366 authored by Michael Moravec's avatar Michael Moravec Committed by Sergei Morozov

CI: Test against MySQL 8.0 on Travis

parent e1ed56c2
...@@ -56,9 +56,10 @@ jobs: ...@@ -56,9 +56,10 @@ jobs:
- bash ./tests/travis/install-mysql-5.7.sh - bash ./tests/travis/install-mysql-5.7.sh
- stage: Test - stage: Test
php: 7.2 php: 7.2
env: DB=mysql MYSQL_VERSION=8.0 COVERAGE=yes env: DB=mysql.docker MYSQL_VERSION=8.0 COVERAGE=yes
dist: xenial
sudo: required sudo: required
services:
- docker
before_script: before_script:
- bash ./tests/travis/install-mysql-8.0.sh - bash ./tests/travis/install-mysql-8.0.sh
- stage: Test - stage: Test
...@@ -72,9 +73,10 @@ jobs: ...@@ -72,9 +73,10 @@ jobs:
- bash ./tests/travis/install-mysql-5.7.sh - bash ./tests/travis/install-mysql-5.7.sh
- stage: Test - stage: Test
php: 7.2 php: 7.2
env: DB=mysqli MYSQL_VERSION=8.0 COVERAGE=yes env: DB=mysqli.docker MYSQL_VERSION=8.0 COVERAGE=yes
dist: xenial
sudo: required sudo: required
services:
- docker
before_script: before_script:
- bash ./tests/travis/install-mysql-8.0.sh - bash ./tests/travis/install-mysql-8.0.sh
- stage: Test - stage: Test
...@@ -207,16 +209,18 @@ jobs: ...@@ -207,16 +209,18 @@ jobs:
- travis_retry composer update --prefer-dist --prefer-lowest - travis_retry composer update --prefer-dist --prefer-lowest
- stage: Test - stage: Test
php: 7.3 php: 7.3
env: DB=mysql MYSQL_VERSION=8.0 env: DB=mysql.docker MYSQL_VERSION=8.0
dist: xenial
sudo: required sudo: required
services:
- docker
before_script: before_script:
- bash ./tests/travis/install-mysql-8.0.sh - bash ./tests/travis/install-mysql-8.0.sh
- stage: Test - stage: Test
php: 7.3 php: 7.3
env: DB=mysqli MYSQL_VERSION=8.0 env: DB=mysqli.docker MYSQL_VERSION=8.0
dist: xenial
sudo: required sudo: required
services:
- docker
before_script: before_script:
- bash ./tests/travis/install-mysql-8.0.sh - bash ./tests/travis/install-mysql-8.0.sh
- stage: Test - stage: Test
...@@ -260,16 +264,18 @@ jobs: ...@@ -260,16 +264,18 @@ jobs:
- bash ./tests/travis/install-mssql.sh - bash ./tests/travis/install-mssql.sh
- stage: Test - stage: Test
php: nightly php: nightly
env: DB=mysql MYSQL_VERSION=8.0 env: DB=mysql.docker MYSQL_VERSION=8.0
dist: xenial
sudo: required sudo: required
services:
- docker
before_script: before_script:
- bash ./tests/travis/install-mysql-8.0.sh - bash ./tests/travis/install-mysql-8.0.sh
- stage: Test - stage: Test
php: nightly php: nightly
env: DB=mysqli MYSQL_VERSION=8.0 env: DB=mysqli.docker MYSQL_VERSION=8.0
dist: xenial
sudo: required sudo: required
services:
- docker
before_script: before_script:
- bash ./tests/travis/install-mysql-8.0.sh - bash ./tests/travis/install-mysql-8.0.sh
- stage: Test - stage: Test
......
...@@ -2,15 +2,18 @@ ...@@ -2,15 +2,18 @@
set -ex set -ex
echo "Installing MySQL 8.0..." echo "Starting MySQL 8.0..."
echo mysql-apt-config mysql-apt-config/select-server select mysql-8.0 | sudo debconf-set-selections echo -e "[mysqld]\ndefault_authentication_plugin=mysql_native_password" > /tmp/mysql-auth.cnf
wget https://dev.mysql.com/get/mysql-apt-config_0.8.10-1_all.deb
sudo dpkg --install mysql-apt-config_0.8.10-1_all.deb
sudo apt-get update -q
sudo apt-get install -q -y --force-yes -o Dpkg::Options::=--force-confnew mysql-server
echo -e "[mysqld]\ndefault_authentication_plugin=mysql_native_password" | sudo tee --append /etc/mysql/my.cnf
sudo /etc/init.d/mysql start
sudo mysql_upgrade
mysql --version sudo docker pull mysql:8.0
sudo docker run \
-d \
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes \
-e MYSQL_DATABASE=doctrine_tests \
-v /tmp/mysql-auth.cnf:/etc/mysql/conf.d/auth.cnf:ro \
-p 33306:3306 \
--name mysql80 \
mysql:8.0
sudo docker exec -i mysql80 bash <<< 'until echo \\q | mysql doctrine_tests > /dev/null 2>&1 ; do sleep 1; done'
<?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>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
<?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>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment