diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml
index 13fc8597b08..56725b50e3b 100644
--- a/.github/workflows/continuous-integration.yml
+++ b/.github/workflows/continuous-integration.yml
@@ -10,11 +10,66 @@ on:
branches:
- "*.x"
- "master"
+ schedule:
+ - cron: "42 3 * * *"
jobs:
+ phpunit-smoke-check:
+ name: "PHPUnit with SQLite"
+ runs-on: "ubuntu-20.04"
+
+ strategy:
+ matrix:
+ php-version:
+ - "7.3"
+ - "7.4"
+ deps:
+ - "fixed"
+ include:
+ - deps: "low"
+ php-version: "7.3"
+
+ steps:
+ - name: "Checkout"
+ uses: "actions/checkout@v2"
+ with:
+ fetch-depth: 2
+
+ - name: "Install PHP"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ php-version: "${{ matrix.php-version }}"
+ coverage: "pcov"
+ ini-values: "zend.assertions=1"
+
+ - name: "Cache dependencies installed with composer"
+ uses: "actions/cache@v2"
+ with:
+ path: "~/.composer/cache"
+ key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
+ restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
+
+ - name: "Install dependencies with composer"
+ run: "composer install --no-interaction --no-progress --no-suggest"
+ if: "${{ matrix.deps == 'fixed' }}"
+
+ - name: "Install lowest possible dependencies with composer"
+ run: "composer update --no-interaction --no-progress --no-suggest --prefer-dist --prefer-lowest"
+ if: "${{ matrix.deps == 'low' }}"
+
+ - name: "Run PHPUnit"
+ run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml --coverage-clover=coverage.xml"
+
+ - name: "Upload coverage file"
+ uses: "actions/upload-artifact@v2"
+ with:
+ name: "phpunit-sqlite-${{ matrix.deps }}-${{ matrix.php-version }}.coverage"
+ path: "coverage.xml"
+
phpunit-oci8:
name: "PHPUnit on OCI8"
runs-on: "ubuntu-20.04"
+ needs: "phpunit-smoke-check"
strategy:
matrix:
@@ -39,6 +94,7 @@ jobs:
php-version: "${{ matrix.php-version }}"
extensions: "oci8"
coverage: "pcov"
+ ini-values: "zend.assertions=1"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
@@ -51,14 +107,18 @@ jobs:
run: "composer install --no-interaction --no-progress --no-suggest"
- name: "Run PHPUnit"
- run: "vendor/bin/phpunit -c ci/github/phpunit.oci8.xml --coverage-clover=coverage.xml"
+ run: "vendor/bin/phpunit -c ci/github/phpunit/oci8.xml --coverage-clover=coverage.xml"
- - name: "Upload Code Coverage"
- uses: "codecov/codecov-action@v1"
+ - name: "Upload coverage file"
+ uses: "actions/upload-artifact@v2"
+ with:
+ name: "${{ github.job }}-${{ matrix.php-version }}.coverage"
+ path: "coverage.xml"
phpunit-pdo-oci:
name: "PHPUnit on PDO_OCI"
runs-on: "ubuntu-20.04"
+ needs: "phpunit-smoke-check"
strategy:
matrix:
@@ -83,6 +143,362 @@ jobs:
php-version: "${{ matrix.php-version }}"
extensions: "pdo_oci"
coverage: "pcov"
+ ini-values: "zend.assertions=1"
+
+ - name: "Cache dependencies installed with composer"
+ uses: "actions/cache@v2"
+ with:
+ path: "~/.composer/cache"
+ key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
+ restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
+
+ - name: "Install dependencies with composer"
+ run: "composer install --no-interaction --no-progress --no-suggest"
+
+ - name: "Run PHPUnit"
+ run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_oci.xml --coverage-clover=coverage.xml"
+
+ - name: "Upload coverage file"
+ uses: "actions/upload-artifact@v2"
+ with:
+ name: "${{ github.job }}-${{ matrix.php-version }}.coverage"
+ path: "coverage.xml"
+
+ phpunit-postgres:
+ name: "PHPUnit with PostgreSQL"
+ runs-on: "ubuntu-20.04"
+ needs: "phpunit-smoke-check"
+
+ strategy:
+ matrix:
+ php-version:
+ - "7.4"
+ postgres-version:
+ - "9.2"
+ - "9.3"
+ - "9.4"
+ - "9.5"
+ - "9.6"
+ - "10"
+ - "11"
+ - "12"
+ - "13"
+
+ services:
+ postgres:
+ image: "postgres:${{ matrix.postgres-version }}"
+ env:
+ POSTGRES_PASSWORD: "postgres"
+
+ options: >-
+ --health-cmd "pg_isready || psql -U postgres -c 'SELECT 1'"
+
+ ports:
+ - "5432:5432"
+
+ steps:
+ - name: "Checkout"
+ uses: "actions/checkout@v2"
+ with:
+ fetch-depth: 2
+
+ - name: "Install PHP"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ php-version: "${{ matrix.php-version }}"
+ coverage: "pcov"
+ ini-values: "zend.assertions=1"
+
+ - name: "Cache dependencies installed with composer"
+ uses: "actions/cache@v2"
+ with:
+ path: "~/.composer/cache"
+ key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
+ restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
+
+ - name: "Install dependencies with composer"
+ run: "composer install --no-interaction --no-progress --no-suggest"
+
+ - name: "Run PHPUnit"
+ run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_pgsql.xml --coverage-clover=coverage.xml"
+
+ - name: "Upload coverage file"
+ uses: "actions/upload-artifact@v2"
+ with:
+ name: "${{ github.job }}-${{ matrix.postgres-version }}-${{ matrix.php-version }}.coverage"
+ path: "coverage.xml"
+
+ phpunit-mariadb:
+ name: "PHPUnit with MariaDB"
+ runs-on: "ubuntu-20.04"
+ needs: "phpunit-smoke-check"
+
+ strategy:
+ matrix:
+ php-version:
+ - "7.4"
+ mariadb-version:
+ - "10.0"
+ - "10.1"
+ - "10.2"
+ - "10.3"
+ - "10.4"
+ - "10.5"
+ extension:
+ - "mysqli"
+ - "pdo_mysql"
+
+ services:
+ mariadb:
+ image: "mariadb:${{ matrix.mariadb-version }}"
+ env:
+ MYSQL_ALLOW_EMPTY_PASSWORD: yes
+ MYSQL_DATABASE: "doctrine_tests"
+
+ options: >-
+ --health-cmd "mysqladmin ping --silent"
+
+ ports:
+ - "3306:3306"
+
+ steps:
+ - name: "Checkout"
+ uses: "actions/checkout@v2"
+ with:
+ fetch-depth: 2
+
+ - name: "Install PHP"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ php-version: "${{ matrix.php-version }}"
+ coverage: "pcov"
+ ini-values: "zend.assertions=1"
+ extensions: "${{ matrix.extension }}"
+
+ - name: "Cache dependencies installed with composer"
+ uses: "actions/cache@v2"
+ with:
+ path: "~/.composer/cache"
+ key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
+ restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
+
+ - name: "Install dependencies with composer"
+ run: "composer install --no-interaction --no-progress --no-suggest"
+
+ - name: "Run PHPUnit"
+ run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml"
+
+ - name: "Upload coverage file"
+ uses: "actions/upload-artifact@v2"
+ with:
+ name: "${{ github.job }}-${{ matrix.mariadb-version }}-${{ matrix.extension }}-${{ matrix.php-version }}.coverage"
+ path: "coverage.xml"
+
+
+ phpunit-mysql:
+ name: "PHPUnit with MySQL"
+ runs-on: "ubuntu-20.04"
+ needs: "phpunit-smoke-check"
+
+ strategy:
+ matrix:
+ php-version:
+ - "7.4"
+ mysql-version:
+ - "5.7"
+ - "8.0"
+ extension:
+ - "mysqli"
+ - "pdo_mysql"
+ config-file-suffix:
+ - ""
+ include:
+ - php-version: "7.3"
+ mysql-version: "8.0"
+ extension: "mysqli"
+ custom-entrypoint: >-
+ --entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
+ - php-version: "7.3"
+ mysql-version: "8.0"
+ extension: "pdo_mysql"
+ custom-entrypoint: >-
+ --entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
+ - mysql-version: "5.7"
+ - mysql-version: "8.0"
+ # https://stackoverflow.com/questions/60902904/how-to-pass-mysql-native-password-to-mysql-service-in-github-actions
+ custom-entrypoint: >-
+ --entrypoint sh mysql:8 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password"
+ - config-file-suffix: "-tls"
+ php-version: "7.4"
+ mysql-version: "8.0"
+ extension: "mysqli"
+
+ services:
+ mysql:
+ image: "mysql:${{ matrix.mysql-version }}"
+
+ options: >-
+ --health-cmd "mysqladmin ping --silent"
+ -e MYSQL_ALLOW_EMPTY_PASSWORD=yes
+ -e MYSQL_DATABASE=doctrine_tests
+ ${{ matrix.custom-entrypoint }}
+
+ ports:
+ - "3306:3306"
+
+ steps:
+ - name: "Checkout"
+ uses: "actions/checkout@v2"
+ with:
+ fetch-depth: 2
+
+ - name: "Install PHP"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ php-version: "${{ matrix.php-version }}"
+ coverage: "pcov"
+ ini-values: "zend.assertions=1"
+ extensions: "${{ matrix.extension }}"
+
+ - name: "Cache dependencies installed with composer"
+ uses: "actions/cache@v2"
+ with:
+ path: "~/.composer/cache"
+ key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
+ restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
+
+ - name: "Install dependencies with composer"
+ run: "composer install --no-interaction --no-progress --no-suggest"
+
+ - name: "Copy TLS-related files"
+ run: 'docker cp "${{ job.services.mysql.id }}:/var/lib/mysql/ca.pem" . && docker cp "${{ job.services.mysql.id }}:/var/lib/mysql/client-cert.pem" . && docker cp "${{ job.services.mysql.id }}:/var/lib/mysql/client-key.pem" .'
+ if: "${{ endsWith(matrix.config-file-suffix, 'tls') }}"
+
+ - name: "Run PHPUnit"
+ run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}${{ matrix.config-file-suffix }}.xml --coverage-clover=coverage.xml"
+
+ - name: "Upload coverage file"
+ uses: "actions/upload-artifact@v2"
+ with:
+ name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.config-file-suffix }}-${{ matrix.php-version }}.coverage"
+ path: "coverage.xml"
+
+ phpunit-mssql:
+ name: "PHPUnit with SQL Server"
+ runs-on: "ubuntu-20.04"
+ needs: "phpunit-smoke-check"
+
+ strategy:
+ matrix:
+ php-version:
+ - "7.3"
+ - "7.4"
+ extension:
+ - "sqlsrv"
+ - "pdo_sqlsrv"
+ collation:
+ - "Latin1_General_100_CI_AS"
+ include:
+ - collation: "Latin1_General_100_CS_AS"
+ php-version: "7.4"
+ extension: "sqlsrv"
+ - collation: "Latin1_General_100_CS_AS"
+ php-version: "7.4"
+ extension: "pdo_sqlsrv"
+
+ services:
+ mssql:
+ image: "microsoft/mssql-server-linux:2017-latest"
+ env:
+ ACCEPT_EULA: "Y"
+ SA_PASSWORD: "Doctrine2018"
+ MSSQL_COLLATION: "${{ matrix.collation }}"
+
+ options: >-
+ --health-cmd "echo quit | /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -l 1 -U sa -P Doctrine2018"
+
+ ports:
+ - "1433:1433"
+
+ steps:
+ - name: "Checkout"
+ uses: "actions/checkout@v2"
+ with:
+ fetch-depth: 2
+
+ - name: "Install PHP"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ php-version: "${{ matrix.php-version }}"
+ coverage: "pcov"
+ ini-values: "zend.assertions=1"
+ tools: "pecl"
+ extensions: "${{ matrix.extension }}-5.7.0preview"
+
+ - name: "Cache dependencies installed with composer"
+ uses: "actions/cache@v2"
+ with:
+ path: "~/.composer/cache"
+ key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
+ restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
+
+ - name: "Install dependencies with composer"
+ run: "composer install --no-interaction --no-progress --no-suggest"
+
+ - name: "Run PHPUnit"
+ run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml"
+
+ - name: "Upload coverage file"
+ uses: "actions/upload-artifact@v2"
+ with:
+ name: "${{ github.job }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.collation }}.coverage"
+ path: "coverage.xml"
+
+ phpunit-ibm-db2:
+ name: "PHPUnit with IBM DB2"
+ runs-on: "ubuntu-18.04"
+ needs: "phpunit-smoke-check"
+
+ strategy:
+ matrix:
+ php-version:
+ - "7.3"
+ - "7.4"
+
+ services:
+ ibm_db2:
+ image: "ibmcom/db2:11.5.0.0"
+ env:
+ DB2INST1_PASSWORD: "Doctrine2018"
+ LICENSE: "accept"
+ DBNAME: "doctrine"
+
+ options: "--privileged=true"
+
+ ports:
+ - "50000:50000"
+
+ steps:
+ - name: "Perform healthcheck from the outside"
+ run: "docker logs -f ${{ job.services.ibm_db2.id }} | sed '/(*) Setup has completed./ q'"
+
+ - name: "Create temporary tablespace"
+ run: "docker exec ${{ job.services.ibm_db2.id }} su - db2inst1 -c 'db2 CONNECT TO doctrine && db2 CREATE USER TEMPORARY TABLESPACE doctrine_tbsp PAGESIZE 4 K'"
+
+ - name: "Checkout"
+ uses: "actions/checkout@v2"
+ with:
+ fetch-depth: 2
+
+ - name: "Install PHP"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ php-version: "${{ matrix.php-version }}"
+ coverage: "pcov"
+ ini-values: "zend.assertions=1,extension=ibm_db2.so, ibm_db2.instance_name=db2inst1"
+
+ - name: "Install ibm_db2 extension"
+ run: "ci/github/ext/install-ibm_db2.sh ${{ matrix.php-version }}"
- name: "Cache dependencies installed with composer"
uses: "actions/cache@v2"
@@ -95,7 +511,78 @@ jobs:
run: "composer install --no-interaction --no-progress --no-suggest"
- name: "Run PHPUnit"
- run: "vendor/bin/phpunit -c ci/github/phpunit.pdo-oci.xml --coverage-clover=coverage.xml"
+ run: "vendor/bin/phpunit -c ci/github/phpunit/ibm_db2.xml --coverage-clover=coverage.xml"
+
+ - name: "Upload coverage file"
+ uses: "actions/upload-artifact@v2"
+ with:
+ name: "${{ github.job }}-${{ matrix.php-version }}.coverage"
+ path: "coverage.xml"
+
+
+ development-deps:
+ name: "PHPUnit with SQLite and development dependencies"
+ runs-on: "ubuntu-20.04"
+
+ strategy:
+ matrix:
+ php-version:
+ - "7.4"
+
+ steps:
+ - name: "Checkout"
+ uses: "actions/checkout@v2"
+
+ - name: "Install PHP"
+ uses: "shivammathur/setup-php@v2"
+ with:
+ php-version: "${{ matrix.php-version }}"
+
+ - name: "Cache dependencies installed with composer"
+ uses: "actions/cache@v2"
+ with:
+ path: "~/.composer/cache"
+ key: "php-${{ matrix.php-version }}-composer-locked-${{ hashFiles('composer.lock') }}"
+ restore-keys: "php-${{ matrix.php-version }}-composer-locked-"
+
+ - name: "Lower minimum stability"
+ run: "composer config minimum-stability dev"
+
+ - name: "Install development dependencies with composer"
+ run: "composer update --no-interaction --no-progress --no-suggest --prefer-dist"
+
+ - name: "Run PHPUnit"
+ run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite.xml"
- - name: "Upload Code Coverage"
+ upload_coverage:
+ name: "Upload coverage to Codecov"
+ runs-on: "ubuntu-20.04"
+ needs:
+ - "phpunit-smoke-check"
+ - "phpunit-oci8"
+ - "phpunit-pdo-oci"
+ - "phpunit-postgres"
+ - "phpunit-mariadb"
+ - "phpunit-mysql"
+ - "phpunit-mssql"
+ - "phpunit-ibm-db2"
+
+ steps:
+ - name: "Checkout"
+ uses: "actions/checkout@v2"
+ with:
+ fetch-depth: 2
+
+ - name: "Download coverage files"
+ uses: "actions/download-artifact@v2"
+ with:
+ path: "reports"
+
+ - name: "Display structure of downloaded files"
+ run: ls -R
+ working-directory: reports
+
+ - name: "Upload to Codecov"
uses: "codecov/codecov-action@v1"
+ with:
+ directory: reports
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 4621a9afa96..00000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,191 +0,0 @@
-language: php
-dist: xenial
-
-cache:
- directories:
- - vendor
- - $HOME/.composer/cache
-
-before_install:
- - phpenv config-rm xdebug.ini || true
- - pecl install pcov
-
-before_script:
- - |
- if [[ -n "$IMAGE" ]]
- then
- bash ./tests/travis/docker-run-mysql-or-mariadb.sh
- fi
-
-install:
- - travis_retry composer -n install --prefer-dist
-
-script:
- - ./vendor/bin/phpunit --configuration tests/travis/$DB.travis.xml --coverage-clover clover.xml
-
-after_success:
- - bash <(curl -s https://codecov.io/bash)
-
-jobs:
- include:
-
- - stage: Smoke Testing
- php: 7.3
- env: DB=sqlite
-
- - stage: Test
- php: 7.3
- env: DB=mysql.docker IMAGE=mysql:5.7
- - stage: Test
- php: 7.3
- env: DB=mysql.docker IMAGE=mysql:8.0
- - stage: Test
- php: 7.3
- env: DB=mysqli.docker IMAGE=mysql:5.7
- - stage: Test
- php: 7.3
- env: DB=mysqli.docker IMAGE=mysql:8.0
- - stage: Test
- php: 7.3
- env: DB=mariadb.docker IMAGE=mariadb:10.0
- - stage: Test
- php: 7.3
- env: DB=mariadb.docker IMAGE=mariadb:10.1
- - stage: Test
- php: 7.3
- env: DB=mariadb.docker IMAGE=mariadb:10.2
- - stage: Test
- php: 7.3
- env: DB=mariadb.docker IMAGE=mariadb:10.3
- - stage: Test
- php: 7.3
- env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.0
- - stage: Test
- php: 7.3
- env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.1
- - stage: Test
- php: 7.3
- env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.2
- - stage: Test
- php: 7.3
- env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3
- - stage: Test
- dist: trusty
- php: 7.3
- env: DB=pgsql POSTGRESQL_VERSION=9.2
- services:
- - postgresql
- addons:
- postgresql: "9.2"
- - stage: Test
- dist: trusty
- php: 7.3
- env: DB=pgsql POSTGRESQL_VERSION=9.3
- services:
- - postgresql
- addons:
- postgresql: "9.3"
- - stage: Test
- php: 7.3
- env: DB=pgsql POSTGRESQL_VERSION=9.4
- addons:
- postgresql: "9.4"
- - stage: Test
- php: 7.3
- env: DB=pgsql POSTGRESQL_VERSION=9.5
- addons:
- postgresql: "9.5"
- - stage: Test
- php: 7.3
- env: DB=pgsql POSTGRESQL_VERSION=9.6
- addons:
- postgresql: "9.6"
- - stage: Test
- php: 7.3
- env: DB=pgsql POSTGRESQL_VERSION=10.0
- sudo: required
- addons:
- postgresql: "10"
- before_script:
- - bash ./tests/travis/install-postgres-10.sh
- - stage: Test
- php: 7.3
- env: DB=pgsql POSTGRESQL_VERSION=11.0
- sudo: required
- before_script:
- - bash ./tests/travis/install-postgres-11.sh
- - stage: Test
- php: 7.3
- env: DB=sqlsrv
- sudo: required
- 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
- 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.3
- env: DB=ibm_db2
- sudo: required
- before_script:
- - 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.4
- env: DB=mysql.docker IMAGE=mysql:8.0
- - stage: Test
- php: 7.4
- env: DB=mysqli-tls.docker IMAGE=mysql:8.0 TLS=yes
- - stage: Test
- php: 7.4
- env: DB=mariadb.docker IMAGE=mariadb:10.3
- - stage: Test
- php: 7.4
- env: DB=mariadb.mysqli.docker IMAGE=mariadb:10.3
- - stage: Test
- php: 7.4
- env: DB=pgsql POSTGRESQL_VERSION=11.0
- sudo: required
- before_script:
- - bash ./tests/travis/install-postgres-11.sh
- - stage: Test
- php: 7.4
- env: DB=sqlite
- - stage: Test
- php: 7.4
- env: DB=sqlsrv MSSQL_COLLATION=Latin1_General_100_CS_AS
- sudo: required
- 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.4
- env: DB=pdo_sqlsrv MSSQL_COLLATION=Latin1_General_100_CS_AS
- sudo: required
- 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
- if: type = cron
- php: 7.2
- env: DB=sqlite DEPENDENCIES=dev
- install:
- - composer config minimum-stability dev
- - travis_retry composer update --prefer-dist
-
- allow_failures:
- - env: DEPENDENCIES=dev
diff --git a/tests/travis/install-db2-ibm_db2.sh b/ci/github/ext/install-ibm_db2.sh
old mode 100644
new mode 100755
similarity index 67%
rename from tests/travis/install-db2-ibm_db2.sh
rename to ci/github/ext/install-ibm_db2.sh
index b59bb6396fd..fa0abc12df7
--- a/tests/travis/install-db2-ibm_db2.sh
+++ b/ci/github/ext/install-ibm_db2.sh
@@ -5,8 +5,8 @@ set -ex
echo "Installing extension"
(
# updating APT packages as per support recommendation
- sudo apt -y -q update
- sudo apt install ksh
+ sudo apt-get -y -q update
+ sudo apt-get install ksh php-pear
cd /tmp
@@ -21,7 +21,6 @@ echo "Installing extension"
cd ibm_db2-*
phpize
./configure --with-IBM_DB2=/tmp/dsdriver
- 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
+ make -j "$(nproc)"
+ sudo make install
)
diff --git a/tests/travis/ibm_db2.travis.xml b/ci/github/phpunit/ibm_db2.xml
similarity index 86%
rename from tests/travis/ibm_db2.travis.xml
rename to ci/github/phpunit/ibm_db2.xml
index c8b758a711f..eabf83d108d 100644
--- a/tests/travis/ibm_db2.travis.xml
+++ b/ci/github/phpunit/ibm_db2.xml
@@ -17,13 +17,13 @@
- ../Doctrine/Tests/DBAL
+ ../../../tests
- ../../lib/Doctrine
+ ../../../lib/Doctrine
diff --git a/tests/travis/mysqli-tls.docker.travis.xml b/ci/github/phpunit/mysqli-tls.xml
similarity index 87%
rename from tests/travis/mysqli-tls.docker.travis.xml
rename to ci/github/phpunit/mysqli-tls.xml
index 568a61ada6c..3a05258a188 100644
--- a/tests/travis/mysqli-tls.docker.travis.xml
+++ b/ci/github/phpunit/mysqli-tls.xml
@@ -10,7 +10,7 @@
-
+
@@ -25,13 +25,13 @@
- ../Doctrine/Tests/DBAL
+ ../../../tests
- ../../lib/Doctrine
+ ../../../lib/Doctrine
diff --git a/tests/travis/mysqli.docker.travis.xml b/ci/github/phpunit/mysqli.xml
similarity index 81%
rename from tests/travis/mysqli.docker.travis.xml
rename to ci/github/phpunit/mysqli.xml
index 9925673195a..1660b7f4493 100644
--- a/tests/travis/mysqli.docker.travis.xml
+++ b/ci/github/phpunit/mysqli.xml
@@ -10,20 +10,20 @@
-
+
- ../Doctrine/Tests/DBAL
+ ../../../tests
- ../../lib/Doctrine
+ ../../../lib/Doctrine
diff --git a/ci/github/phpunit.oci8.xml b/ci/github/phpunit/oci8.xml
similarity index 90%
rename from ci/github/phpunit.oci8.xml
rename to ci/github/phpunit/oci8.xml
index bbe76733cac..fef723fec5e 100644
--- a/ci/github/phpunit.oci8.xml
+++ b/ci/github/phpunit/oci8.xml
@@ -24,13 +24,13 @@
- ../../tests
+ ../../../tests
- ../../lib/Doctrine
+ ../../../lib/Doctrine
diff --git a/tests/travis/mysql.docker.travis.xml b/ci/github/phpunit/pdo_mysql.xml
similarity index 81%
rename from tests/travis/mysql.docker.travis.xml
rename to ci/github/phpunit/pdo_mysql.xml
index 6efa94e94eb..99612ab3271 100644
--- a/tests/travis/mysql.docker.travis.xml
+++ b/ci/github/phpunit/pdo_mysql.xml
@@ -10,20 +10,20 @@
-
+
- ../Doctrine/Tests/DBAL
+ ../../../tests
- ../../lib/Doctrine
+ ../../../lib/Doctrine
diff --git a/ci/github/phpunit.pdo-oci.xml b/ci/github/phpunit/pdo_oci.xml
similarity index 90%
rename from ci/github/phpunit.pdo-oci.xml
rename to ci/github/phpunit/pdo_oci.xml
index d25c124db43..610b56cd72e 100644
--- a/ci/github/phpunit.pdo-oci.xml
+++ b/ci/github/phpunit/pdo_oci.xml
@@ -24,13 +24,13 @@
- ../../tests
+ ../../../tests
- ../../lib/Doctrine
+ ../../../lib/Doctrine
diff --git a/tests/travis/pgsql.travis.xml b/ci/github/phpunit/pdo_pgsql.xml
similarity index 81%
rename from tests/travis/pgsql.travis.xml
rename to ci/github/phpunit/pdo_pgsql.xml
index b13bc3e1b4c..8f6b760781e 100644
--- a/tests/travis/pgsql.travis.xml
+++ b/ci/github/phpunit/pdo_pgsql.xml
@@ -11,18 +11,19 @@
+
- ../Doctrine/Tests/DBAL
+ ../../../tests
- ../../lib/Doctrine
+ ../../../lib/Doctrine
diff --git a/tests/travis/pdo_sqlsrv.travis.xml b/ci/github/phpunit/pdo_sqlsrv.xml
similarity index 86%
rename from tests/travis/pdo_sqlsrv.travis.xml
rename to ci/github/phpunit/pdo_sqlsrv.xml
index a6afaabfff0..0f1e1b2edda 100644
--- a/tests/travis/pdo_sqlsrv.travis.xml
+++ b/ci/github/phpunit/pdo_sqlsrv.xml
@@ -17,13 +17,13 @@
- ../Doctrine/Tests/DBAL
+ ../../../tests
- ../../lib/Doctrine
+ ../../../lib/Doctrine
diff --git a/tests/travis/sqlite.travis.xml b/ci/github/phpunit/sqlite.xml
similarity index 81%
rename from tests/travis/sqlite.travis.xml
rename to ci/github/phpunit/sqlite.xml
index 7629953cc15..3e911bd0afc 100644
--- a/tests/travis/sqlite.travis.xml
+++ b/ci/github/phpunit/sqlite.xml
@@ -9,13 +9,13 @@
>
- ../Doctrine/Tests/DBAL
+ ../../../tests
- ../../lib/Doctrine
+ ../../../lib/Doctrine
diff --git a/tests/travis/sqlsrv.travis.xml b/ci/github/phpunit/sqlsrv.xml
similarity index 86%
rename from tests/travis/sqlsrv.travis.xml
rename to ci/github/phpunit/sqlsrv.xml
index c5412cdc2f6..02dfcbd4b51 100644
--- a/tests/travis/sqlsrv.travis.xml
+++ b/ci/github/phpunit/sqlsrv.xml
@@ -17,13 +17,13 @@
- ../Doctrine/Tests/DBAL
+ ../../../tests
- ../../lib/Doctrine
+ ../../../lib/Doctrine
diff --git a/tests/travis/docker-run-mysql-or-mariadb.sh b/tests/travis/docker-run-mysql-or-mariadb.sh
deleted file mode 100644
index de0e53b9fcf..00000000000
--- a/tests/travis/docker-run-mysql-or-mariadb.sh
+++ /dev/null
@@ -1,50 +0,0 @@
-#!/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
-
-if [[ "$TLS" == "yes" ]]
-then
- for file in "ca.pem" "client-cert.pem" "client-key.pem"
- do
- docker cp "rdbms:/var/lib/mysql/$file" .
- done
-fi
diff --git a/tests/travis/install-db2.sh b/tests/travis/install-db2.sh
deleted file mode 100644
index 79c1be98f74..00000000000
--- a/tests/travis/install-db2.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env bash
-
-set -ex
-
-echo Setting up IBM DB2
-
-echo "su - db2inst1 -c 'db2 CONNECT TO doctrine && db2 CREATE USER TEMPORARY TABLESPACE doctrine_tbsp PAGESIZE 4 K'" > /tmp/doctrine-init.sh
-chmod +x /tmp/doctrine-init.sh
-
-sudo docker run \
- -d \
- -p 50000:50000 \
- -e DB2INST1_PASSWORD=Doctrine2018 \
- -e LICENSE=accept \
- -e DBNAME=doctrine \
- -v /tmp/doctrine-init.sh:/var/custom/doctrine-init.sh:ro \
- --name db2 \
- --privileged=true \
- ibmcom/db2:11.5.0.0
-
-sudo docker logs -f db2 | sed '/(*) Setup has completed./ q'
-
-echo DB2 started
diff --git a/tests/travis/install-mssql-pdo_sqlsrv.sh b/tests/travis/install-mssql-pdo_sqlsrv.sh
deleted file mode 100644
index 71e07aee231..00000000000
--- a/tests/travis/install-mssql-pdo_sqlsrv.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-set -ex
-
-echo "Installing extension"
-
-pecl install pdo_sqlsrv-5.7.0preview
diff --git a/tests/travis/install-mssql-sqlsrv.sh b/tests/travis/install-mssql-sqlsrv.sh
deleted file mode 100644
index d44841360dc..00000000000
--- a/tests/travis/install-mssql-sqlsrv.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-set -ex
-
-echo "Installing extension"
-
-pecl install sqlsrv-5.7.0preview
diff --git a/tests/travis/install-mssql.sh b/tests/travis/install-mssql.sh
deleted file mode 100644
index d17058e3455..00000000000
--- a/tests/travis/install-mssql.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-
-set -ex
-
-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' \
- -e "MSSQL_COLLATION=${MSSQL_COLLATION:-Latin1_General_100_CI_AS}" \
- -p 127.0.0.1:1433:1433 \
- --name mssql \
- -d \
- microsoft/mssql-server-linux:2017-latest
-
-sudo docker exec -i mssql bash <<< 'until echo quit | /opt/mssql-tools/bin/sqlcmd -S 127.0.0.1 -l 1 -U sa -P Doctrine2018 > /dev/null 2>&1 ; do sleep 1; done'
-
-echo SQL Server started
diff --git a/tests/travis/install-postgres-10.sh b/tests/travis/install-postgres-10.sh
deleted file mode 100644
index 88041241e6e..00000000000
--- a/tests/travis/install-postgres-10.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env bash
-
-set -ex
-
-echo "Installing Postgres 10"
-sudo service postgresql stop
-sudo apt-get remove -q 'postgresql-*'
-sudo apt-get update -q
-sudo apt-get install -q postgresql-10 postgresql-client-10
-sudo cp /etc/postgresql/{9.6,10}/main/pg_hba.conf
-
-echo "Restarting Postgres 10"
-sudo service postgresql restart
diff --git a/tests/travis/install-postgres-11.sh b/tests/travis/install-postgres-11.sh
deleted file mode 100644
index 2ef1aabc4f0..00000000000
--- a/tests/travis/install-postgres-11.sh
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-
-set -ex
-
-echo "Preparing Postgres 11"
-
-sudo service postgresql stop || true
-
-sudo docker run -d --name postgres11 -p 5432:5432 postgres:11.1
-sudo docker exec -i postgres11 bash <<< 'until pg_isready -U postgres > /dev/null 2>&1 ; do sleep 1; done'
-
-echo "Postgres 11 ready"
diff --git a/tests/travis/install-sqlsrv-dependencies.sh b/tests/travis/install-sqlsrv-dependencies.sh
deleted file mode 100644
index ff91bfdfaf0..00000000000
--- a/tests/travis/install-sqlsrv-dependencies.sh
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/usr/bin/env bash
-
-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/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
diff --git a/tests/travis/mariadb.docker.travis.xml b/tests/travis/mariadb.docker.travis.xml
deleted file mode 100644
index 6efa94e94eb..00000000000
--- a/tests/travis/mariadb.docker.travis.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- ../Doctrine/Tests/DBAL
-
-
-
-
-
- ../../lib/Doctrine
-
-
-
diff --git a/tests/travis/mariadb.mysqli.docker.travis.xml b/tests/travis/mariadb.mysqli.docker.travis.xml
deleted file mode 100644
index 9925673195a..00000000000
--- a/tests/travis/mariadb.mysqli.docker.travis.xml
+++ /dev/null
@@ -1,29 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
- ../Doctrine/Tests/DBAL
-
-
-
-
-
- ../../lib/Doctrine
-
-
-