Run DB2 tests on Travis

parent f3339a01
......@@ -21,7 +21,7 @@ before_commands:
tools:
external_code_coverage:
timeout: 3600
runs: 21 # 17x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 1x ContinuousPHP
runs: 22 # 18x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 1x ContinuousPHP
filter:
excluded_paths:
......
......@@ -356,6 +356,24 @@ jobs:
- bash ./tests/travis/install-mssql-$DB.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
env: DB=ibm_db2 COVERAGE=yes
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-db2.sh
- bash ./tests/travis/install-db2-$DB.sh
- stage: Test
php: 7.2
env: DB=ibm_db2
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-db2.sh
- bash ./tests/travis/install-db2-$DB.sh
- stage: Test
php: 7.1
env: DB=sqlite DEPENDENCIES=low
......
<?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="ibm_db2"/>
<var name="db_host" value="127.0.0.1"/>
<var name="db_username" value="db2inst1"/>
<var name="db_password" value="Doctrine2018"/>
<var name="db_name" value="doctrine"/>
<var name="db_port" value="50000"/>
<var name="tmpdb_type" value="ibm_db2"/>
<var name="tmpdb_host" value="127.0.0.1"/>
<var name="tmpdb_username" value="db2inst1"/>
<var name="tmpdb_password" value="Doctrine2018"/>
<var name="tmpdb_name" value="doctrine"/>
<var name="tmpdb_port" value="50000"/>
</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>
#!/usr/bin/env bash
set -ex
echo "Installing extension"
(
cd /tmp
pecl download ibm_db2
tar xf ibm_db2-*
cd ibm_db2-*
phpize
./configure --with-IBM_DB2=/tmp/db2
make -j `nproc`
make install
echo -e 'extension=ibm_db2.so\nibm_db2.instance_name=db2inst1' > ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/ibm_db2.ini
)
#!/usr/bin/env bash
set -ex
echo Setting up IBM DB2
sudo docker pull ibmcom/db2express-c:10.5.0.5-3.10.0
sudo docker run \
-d \
-p 50000:50000 \
-e DB2INST1_PASSWORD=Doctrine2018 \
-e LICENSE=accept \
--name db2 \
ibmcom/db2express-c:10.5.0.5-3.10.0 \
db2start
sleep 5
sudo docker exec db2 su - db2inst1 -c 'db2 create db doctrine'
echo DB2 started
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