Unverified Commit 24adecc1 authored by Marco Pivetta's avatar Marco Pivetta Committed by GitHub

Merge pull request #3050 from Majkl578/travis-mssql

Test SQL Server 17 on Travis
parents 9e68c3cc 150a55b7
...@@ -277,6 +277,43 @@ jobs: ...@@ -277,6 +277,43 @@ jobs:
before_script: before_script:
- bash ./tests/travis/install-postgres-10.sh - bash ./tests/travis/install-postgres-10.sh
- stage: Test
env: DB=sqlsrv
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mssql-$DB.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
php: 7.2
env: DB=sqlsrv
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mssql-$DB.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
php: 7.1
env: DB=pdo_sqlsrv
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mssql-$DB.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
php: 7.2
env: DB=pdo_sqlsrv
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mssql-$DB.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test - stage: Test
php: 7.1 php: 7.1
env: DB=sqlite DEPENDENCIES=low env: DB=sqlite DEPENDENCIES=low
......
#!/usr/bin/env bash
set -ex
echo "Installing extension"
pecl install pdo_sqlsrv-5.2.0RC1
#!/usr/bin/env bash
set -ex
echo "Installing extension"
pecl install sqlsrv-5.2.0RC1
#!/usr/bin/env bash
set -ex
echo Installing drivers
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
sudo apt-get update
ACCEPT_EULA=Y sudo apt-get install -qy msodbcsql17 mssql-tools unixodbc libssl1.0.0
echo Setting up Microsoft SQL Server
sudo docker pull microsoft/mssql-server-linux:2017-latest
sudo docker run \
-e 'ACCEPT_EULA=Y' \
-e 'SA_PASSWORD=Doctrine2018' \
-p 127.0.0.1:1433:1433 \
--name db \
-d \
microsoft/mssql-server-linux:2017-latest
retries=10
until (echo quit | /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -l 1 -U sa -P Doctrine2018 &> /dev/null)
do
if [[ "$retries" -le 0 ]]; then
echo SQL Server did not start
exit 1
fi
retries=$((retries - 1))
echo Waiting for SQL Server to start...
sleep 2s
done
echo SQL Server started
<?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"
verbose="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
>
<php>
<ini name="error_reporting" value="-1" />
<var name="db_type" value="pdo_sqlsrv"/>
<var name="db_host" value="127.0.0.1" />
<var name="db_username" value="sa" />
<var name="db_password" value="Doctrine2018" />
<var name="db_name" value="doctrine" />
<var name="db_port" value="1433"/>
<var name="tmpdb_type" value="pdo_sqlsrv"/>
<var name="tmpdb_host" value="127.0.0.1" />
<var name="tmpdb_username" value="sa" />
<var name="tmpdb_password" value="Doctrine2018" />
<var name="tmpdb_port" value="1433"/>
</php>
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
<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"
verbose="true"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
>
<php>
<ini name="error_reporting" value="-1" />
<var name="db_type" value="sqlsrv"/>
<var name="db_host" value="127.0.0.1" />
<var name="db_username" value="sa" />
<var name="db_password" value="Doctrine2018" />
<var name="db_name" value="doctrine" />
<var name="db_port" value="1433"/>
<var name="tmpdb_type" value="sqlsrv"/>
<var name="tmpdb_host" value="127.0.0.1" />
<var name="tmpdb_username" value="sa" />
<var name="tmpdb_password" value="Doctrine2018" />
<var name="tmpdb_port" value="1433"/>
</php>
<testsuites>
<testsuite name="Doctrine DBAL Test Suite">
<directory>../Doctrine/Tests/DBAL</directory>
</testsuite>
</testsuites>
<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