Unverified Commit 8b9a3200 authored by Luís Cobucci's avatar Luís Cobucci Committed by GitHub

Merge pull request #3814 from morozov/travis-php-nightly

Added builds against PHP nightly on Travis
parents 228b18bd 38d1f4f6
......@@ -21,7 +21,7 @@ before_commands:
tools:
external_code_coverage:
timeout: 3600
runs: 30 # 25x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 2x ContinuousPHP
runs: 26 # 21x Travis (jobs with COVERAGE=yes) + 3x AppVeyor (jobs with coverage=yes) + 2x ContinuousPHP
filter:
excluded_paths:
......
language: php
sudo: false
dist: trusty
dist: bionic
cache:
directories:
- vendor
- $HOME/.composer/cache
directories:
- vendor
- $HOME/.composer/cache
before_install:
- phpenv config-rm xdebug.ini || true
- |
if [ "x$COVERAGE" == "xyes" ]; then
pecl install pcov-1.0.0
pecl install pcov-1.0.6
fi
before_script:
- if [[ "$DB" == "mysql" || "$DB" == "mysqli" || "$DB" == *"mariadb"* ]]; then mysql < tests/travis/create-mysql-schema.sql; fi;
install:
- travis_retry composer -n install --prefer-dist
- |
if [[ $TRAVIS_PHP_VERSION = "nightly" ]]; then
export COMPOSER_FLAGS="--ignore-platform-reqs"
fi
- travis_retry composer -n install --prefer-dist $COMPOSER_FLAGS
script:
- |
......@@ -39,15 +42,15 @@ jobs:
include:
- stage: Smoke Testing
php: 7.3
php: 7.4
env: DB=sqlite COVERAGE=yes
- stage: Smoke Testing
php: 7.3
php: 7.4
env: PHPStan
install: travis_retry composer install --prefer-dist
script: vendor/bin/phpstan analyse
- stage: Smoke Testing
php: 7.3
php: 7.4
env: PHP_CodeSniffer
install: travis_retry composer install --prefer-dist
script: vendor/bin/phpcs
......@@ -109,17 +112,81 @@ jobs:
- 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.2
env: DB=sqlite DEPENDENCIES=low
install:
- travis_retry composer update --prefer-dist --prefer-lowest
- stage: Test
php: 7.3
env: DB=mysql COVERAGE=yes
env: DB=mysql.docker MYSQL_VERSION=8.0
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
- stage: Test
php: 7.3
env: DB=mysqli.docker MYSQL_VERSION=8.0
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
- stage: Test
php: 7.3
env: DB=mariadb MARIADB_VERSION=10.3
addons:
mariadb: 10.3
- stage: Test
php: 7.3
env: DB=mariadb.mysqli MARIADB_VERSION=10.3
addons:
mariadb: 10.3
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=11.0
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-postgres-11.sh
- stage: Test
php: 7.3
env: DB=sqlite
- stage: Test
php: 7.3
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.3
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.4
env: DB=mysql COVERAGE=yes
services:
- mysql
- stage: Test
php: 7.4
env: DB=mysql.docker MYSQL_VERSION=5.7 COVERAGE=yes
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh
- stage: Test
php: 7.3
php: 7.4
env: DB=mysql.docker MYSQL_VERSION=8.0 COVERAGE=yes
sudo: required
services:
......@@ -127,16 +194,18 @@ jobs:
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
- stage: Test
php: 7.3
php: 7.4
env: DB=mysqli COVERAGE=yes
services:
- mysql
- stage: Test
php: 7.3
php: 7.4
env: DB=mysqli.docker MYSQL_VERSION=5.7 COVERAGE=yes
sudo: required
before_script:
- bash ./tests/travis/install-mysql-5.7.sh
- stage: Test
php: 7.3
php: 7.4
env: DB=mysqli.docker MYSQL_VERSION=8.0 COVERAGE=yes
sudo: required
services:
......@@ -144,92 +213,64 @@ jobs:
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
- stage: Test
php: 7.3
env: DB=mariadb MARIADB_VERSION=10.0 COVERAGE=yes
addons:
mariadb: 10.0
- stage: Test
php: 7.3
env: DB=mariadb MARIADB_VERSION=10.1 COVERAGE=yes
addons:
mariadb: 10.1
php: 7.4
env: DB=mariadb.docker MARIADB_VERSION=10.1 COVERAGE=yes
services:
- docker
before_script:
- bash ./tests/travis/install-mariadb.sh
- stage: Test
php: 7.3
php: 7.4
env: DB=mariadb MARIADB_VERSION=10.2 COVERAGE=yes
addons:
mariadb: 10.2
- stage: Test
php: 7.3
php: 7.4
env: DB=mariadb MARIADB_VERSION=10.3 COVERAGE=yes
addons:
mariadb: 10.3
- stage: Test
php: 7.3
env: DB=mariadb.mysqli MARIADB_VERSION=10.0 COVERAGE=yes
addons:
mariadb: 10.0
- stage: Test
php: 7.3
env: DB=mariadb.mysqli MARIADB_VERSION=10.1 COVERAGE=yes
addons:
mariadb: 10.1
php: 7.4
env: DB=mariadb.mysqli.docker MARIADB_VERSION=10.1 COVERAGE=yes
services:
- docker
before_script:
- bash ./tests/travis/install-mariadb.sh
- stage: Test
php: 7.3
php: 7.4
env: DB=mariadb.mysqli MARIADB_VERSION=10.2 COVERAGE=yes
addons:
mariadb: 10.2
- stage: Test
php: 7.3
php: 7.4
env: DB=mariadb.mysqli MARIADB_VERSION=10.3 COVERAGE=yes
addons:
mariadb: 10.3
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=9.2 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.2"
- stage: Test
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=9.3 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.3"
- stage: Test
php: 7.3
php: 7.4
env: DB=pgsql POSTGRESQL_VERSION=9.4 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.4"
- stage: Test
php: 7.3
php: 7.4
env: DB=pgsql POSTGRESQL_VERSION=9.5 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.5"
- stage: Test
php: 7.3
php: 7.4
env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes
services:
- postgresql
addons:
postgresql: "9.6"
- stage: Test
php: 7.3
php: 7.4
env: DB=pgsql POSTGRESQL_VERSION=10.0 COVERAGE=yes
sudo: required
services:
- postgresql
addons:
postgresql: "9.6"
postgresql: "10"
before_script:
- bash ./tests/travis/install-postgres-10.sh
- stage: Test
php: 7.3
php: 7.4
env: DB=pgsql POSTGRESQL_VERSION=11.0 COVERAGE=yes
sudo: required
services:
......@@ -237,7 +278,7 @@ jobs:
before_script:
- bash ./tests/travis/install-postgres-11.sh
- stage: Test
php: 7.3
php: 7.4
env: DB=sqlsrv COVERAGE=yes
sudo: required
services:
......@@ -247,7 +288,7 @@ jobs:
- bash ./tests/travis/install-mssql-sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
php: 7.3
php: 7.4
env: DB=pdo_sqlsrv COVERAGE=yes
sudo: required
services:
......@@ -257,7 +298,7 @@ jobs:
- bash ./tests/travis/install-mssql-pdo_sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
php: 7.3
php: 7.4
env: DB=ibm_db2 COVERAGE=yes
sudo: required
services:
......@@ -266,12 +307,7 @@ jobs:
- bash ./tests/travis/install-db2.sh
- bash ./tests/travis/install-db2-ibm_db2.sh
- stage: Test
php: 7.3
env: DB=sqlite DEPENDENCIES=low
install:
- travis_retry composer update --prefer-dist --prefer-lowest
- stage: Test
php: 7.4snapshot
php: nightly
env: DB=mysql.docker MYSQL_VERSION=8.0
sudo: required
services:
......@@ -279,7 +315,7 @@ jobs:
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
- stage: Test
php: 7.4snapshot
php: nightly
env: DB=mysqli.docker MYSQL_VERSION=8.0
sudo: required
services:
......@@ -287,17 +323,17 @@ jobs:
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
- stage: Test
php: 7.4snapshot
php: nightly
env: DB=mariadb MARIADB_VERSION=10.3
addons:
mariadb: 10.3
- stage: Test
php: 7.4snapshot
php: nightly
env: DB=mariadb.mysqli MARIADB_VERSION=10.3
addons:
mariadb: 10.3
- stage: Test
php: 7.4snapshot
php: nightly
env: DB=pgsql POSTGRESQL_VERSION=11.0
sudo: required
services:
......@@ -305,10 +341,10 @@ jobs:
before_script:
- bash ./tests/travis/install-postgres-11.sh
- stage: Test
php: 7.4snapshot
php: nightly
env: DB=sqlite
- stage: Test
php: 7.4snapshot
php: nightly
env: DB=sqlsrv
sudo: required
services:
......@@ -318,7 +354,7 @@ jobs:
- bash ./tests/travis/install-mssql-sqlsrv.sh
- bash ./tests/travis/install-mssql.sh
- stage: Test
php: 7.4snapshot
php: nightly
env: DB=pdo_sqlsrv
sudo: required
services:
......@@ -338,3 +374,4 @@ jobs:
allow_failures:
- env: DEPENDENCIES=dev
- php: nightly
......@@ -2621,16 +2621,16 @@
},
{
"name": "squizlabs/php_codesniffer",
"version": "3.4.0",
"version": "3.5.3",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "379deb987e26c7cd103a7b387aea178baec96e48"
"reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/379deb987e26c7cd103a7b387aea178baec96e48",
"reference": "379deb987e26c7cd103a7b387aea178baec96e48",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/557a1fc7ac702c66b0bbfe16ab3d55839ef724cb",
"reference": "557a1fc7ac702c66b0bbfe16ab3d55839ef724cb",
"shasum": ""
},
"require": {
......@@ -2663,12 +2663,12 @@
}
],
"description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "http://www.squizlabs.com/php-codesniffer",
"homepage": "https://github.com/squizlabs/PHP_CodeSniffer",
"keywords": [
"phpcs",
"standards"
],
"time": "2018-12-19T23:57:18+00:00"
"time": "2019-12-04T04:46:47+00:00"
},
{
"name": "symfony/console",
......
......@@ -79,4 +79,10 @@
<exclude-pattern>lib/Doctrine/DBAL/Types/ObjectType.php</exclude-pattern>
<exclude-pattern>tests/Doctrine/Tests/DBAL/Driver/Mysqli/MysqliConnectionTest.php</exclude-pattern>
</rule>
<!-- The SQLSRV_* functions are defined in the upper case by the sqlsrv extension and violate the standard
see https://docs.microsoft.com/en-us/sql/connect/php/constants-microsoft-drivers-for-php-for-sql-server -->
<rule ref="Squiz.PHP.LowercasePHPFunctions.UseStatementUppercase">
<exclude-pattern>lib/Doctrine/DBAL/Driver/SQLSrv/SQLSrvStatement.php</exclude-pattern>
</rule>
</ruleset>
......@@ -43,7 +43,7 @@ class ResultCacheTest extends DbalFunctionalTestCase
$this->connection->insert('caching', $row);
}
$config = $this->connection->getConfiguration();
$config = $this->connection->getConfiguration();
$config->setSQLLogger($this->sqlLogger = new DebugStack());
$cache = new ArrayCache();
......
......@@ -30,7 +30,7 @@ class DrizzleSchemaManagerTest extends SchemaManagerFunctionalTestCase
public function testColumnCollation() : void
{
$table = new Table('test_collation');
$table = new Table('test_collation');
$table->addOption('collate', $collation = 'utf8_unicode_ci');
$table->addColumn('id', 'integer');
$table->addColumn('text', 'text');
......
......@@ -269,7 +269,7 @@ class MySqlSchemaManagerTest extends SchemaManagerFunctionalTestCase
public function testColumnCollation() : void
{
$table = new Table('test_collation');
$table = new Table('test_collation');
$table->addOption('collate', $collation = 'latin1_swedish_ci');
$table->addOption('charset', 'latin1');
$table->addColumn('id', 'integer');
......
......@@ -170,7 +170,6 @@ class SQLServer2012PlatformTest extends AbstractSQLServerPlatformTestCase
);
self::assertEquals(
'SELECT ' .
'u.id, ' .
'(u.foo/2) foodiv, ' .
......
DROP USER IF EXISTS 'travis'@'%';
CREATE USER 'travis'@'%';
CREATE SCHEMA doctrine_tests;
CREATE SCHEMA test_create_database;
CREATE SCHEMA test_drop_database;
......
#!/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'
......@@ -5,6 +5,6 @@ set -ex
echo Installing driver dependencies
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
curl https://packages.microsoft.com/config/ubuntu/16.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 unixodbc unixodbc-dev libssl1.0.0
<?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>
<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>
<groups>
<exclude>
<group>performance</group>
<group>locking_functional</group>
</exclude>
</groups>
</phpunit>
......@@ -2,7 +2,6 @@
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="../../vendor/phpunit/phpunit/phpunit.xsd"
colors="true"
bootstrap="../../vendor/autoload.php"
beStrictAboutOutputDuringTests="true"
beStrictAboutTodoAnnotatedTests="true"
failOnRisky="true"
......@@ -44,4 +43,3 @@
</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