From dbc940caeb6f825a94373990431a9565bc6390ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gr=C3=A9goire=20Paris?= Date: Mon, 28 Sep 2020 14:31:24 +0200 Subject: [PATCH] Migrate some jobs from Travis to Github Actions --- .github/workflows/continuous-integration.yml | 383 ++++++++++++++++++ .travis.yml | 143 ------- .../github}/install-db2-ibm_db2.sh | 9 +- .../github/phpunit.ibm_db2.xml | 2 +- .../github/phpunit.mysql-mariadb.mysqli.xml | 2 +- .../phpunit.mysql-mariadb.pdo_mysql.xml | 2 +- .../github/phpunit.mysql-tls.mysqli.xml | 2 +- .../github/phpunit.pdo_sqlsrv.xml | 2 +- .../github/phpunit.pgsql.xml | 10 +- .../github/phpunit.sqlite.xml | 8 +- .../github/phpunit.sqlsrv.xml | 2 +- tests/travis/docker-run-mysql-or-mariadb.sh | 50 --- tests/travis/install-db2.sh | 23 -- tests/travis/install-mssql-pdo_sqlsrv.sh | 7 - tests/travis/install-mssql-sqlsrv.sh | 7 - tests/travis/install-mssql.sh | 19 - tests/travis/install-postgres-10.sh | 13 - tests/travis/install-postgres-11.sh | 12 - tests/travis/install-sqlsrv-dependencies.sh | 10 - 19 files changed, 399 insertions(+), 307 deletions(-) rename {tests/travis => ci/github}/install-db2-ibm_db2.sh (67%) rename tests/travis/ibm_db2.travis.xml => ci/github/phpunit.ibm_db2.xml (94%) rename tests/travis/mysqli.docker.travis.xml => ci/github/phpunit.mysql-mariadb.mysqli.xml (94%) rename tests/travis/mariadb.docker.travis.xml => ci/github/phpunit.mysql-mariadb.pdo_mysql.xml (94%) rename tests/travis/mysqli-tls.docker.travis.xml => ci/github/phpunit.mysql-tls.mysqli.xml (95%) rename tests/travis/pdo_sqlsrv.travis.xml => ci/github/phpunit.pdo_sqlsrv.xml (94%) rename tests/travis/mariadb.mysqli.docker.travis.xml => ci/github/phpunit.pgsql.xml (75%) rename tests/travis/mysql.docker.travis.xml => ci/github/phpunit.sqlite.xml (69%) rename tests/travis/sqlsrv.travis.xml => ci/github/phpunit.sqlsrv.xml (94%) delete mode 100644 tests/travis/docker-run-mysql-or-mariadb.sh delete mode 100644 tests/travis/install-db2.sh delete mode 100644 tests/travis/install-mssql-pdo_sqlsrv.sh delete mode 100644 tests/travis/install-mssql-sqlsrv.sh delete mode 100644 tests/travis/install-mssql.sh delete mode 100644 tests/travis/install-postgres-10.sh delete mode 100644 tests/travis/install-postgres-11.sh delete mode 100644 tests/travis/install-sqlsrv-dependencies.sh diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 1b38ac3651c..3527153a47c 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -69,9 +69,60 @@ jobs: - name: "Run a static analysis with vimeo/psalm" run: "vendor/bin/psalm --show-info=false --stats --output-format=github --threads=4" + phpunit-sqlite: + name: "PHPUnit with SQLite" + runs-on: "ubuntu-latest" + + 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" + tools: pecl + extensions: "${{ matrix.driver }}-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" + 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 Code Coverage" + uses: "codecov/codecov-action@v1" + phpunit-oci8: name: "PHPUnit on OCI8" runs-on: "ubuntu-latest" + needs: phpunit-sqlite strategy: matrix: @@ -116,6 +167,7 @@ jobs: phpunit-pdo-oci: name: "PHPUnit on PDO_OCI" runs-on: "ubuntu-latest" + needs: phpunit-sqlite strategy: matrix: @@ -156,3 +208,334 @@ jobs: - name: "Upload Code Coverage" uses: "codecov/codecov-action@v1" + + phpunit-postgres: + name: "PHPUnit with PostgreSQL" + runs-on: "ubuntu-latest" + needs: phpunit-sqlite + + strategy: + matrix: + php-version: + - "7.4" + postgres-version: + - "9.3" + - "9.4" + - "9.5" + - "9.6" + - "10" + - "11.1" + + services: + postgres: + image: postgres:${{ matrix.postgres-version }} + env: + POSTGRES_PASSWORD: postgres + + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + 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" + + - 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.pgsql.xml --coverage-clover=coverage.xml" + + - name: "Upload Code Coverage" + uses: "codecov/codecov-action@v1" + + phpunit-mariadb: + name: "PHPUnit with MariaDB" + runs-on: "ubuntu-latest" + needs: phpunit-sqlite + + strategy: + matrix: + php-version: + - "7.4" + mariadb-version: + - "10.0" + - "10.1" + - "10.2" + - "10.3" + driver: + - "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" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + ports: + - "33306: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" + + - 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.mysql-mariadb.${{ matrix.driver }}.xml --coverage-clover=coverage.xml" + + - name: "Upload Code Coverage" + uses: "codecov/codecov-action@v1" + + phpunit-mysql: + name: "PHPUnit with MySQL" + runs-on: "ubuntu-latest" + needs: phpunit-sqlite + + strategy: + matrix: + php-version: + - "7.3" + - "7.4" + mysql-version: + - "5.7" + - "8.0" + driver: + - "mysqli" + - "pdo_mysql" + config-file: + - "mysql-mariadb" + include: + - mysql-version: '5.7' + custom-entrypoint: '' + - 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: "mysql-tls" + php-version: "7.4" + mysql-version: "8.0" + driver: "mysqli" + + services: + mysql: + image: mysql:${{ matrix.mysql-version }} + + options: >- + --health-cmd "mysqladmin ping --silent" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + -e MYSQL_ALLOW_EMPTY_PASSWORD=yes + -e MYSQL_DATABASE=doctrine_tests + ${{ matrix.custom-entrypoint }} + + ports: + - "33306: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" + + - 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, 'tls') }} + + - name: "Run PHPUnit" + run: "vendor/bin/phpunit -c ci/github/phpunit.${{ matrix.config-file }}.${{ matrix.driver }}.xml --coverage-clover=coverage.xml" + + - name: "Upload Code Coverage" + uses: "codecov/codecov-action@v1" + + phpunit-mssql: + name: "PHPUnit with MSSQL" + runs-on: "ubuntu-latest" + needs: phpunit-sqlite + + strategy: + matrix: + php-version: + - "7.3" + - "7.4" + driver: + - "sqlsrv" + - "pdo_sqlsrv" + collation: + - Latin1_General_100_CI_AS + include: + - collation: Latin1_General_100_CS_AS + php-version: "7.4" + driver: "sqlsrv" + - collation: Latin1_General_100_CS_AS + php-version: "7.4" + driver: "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" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + + 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" + tools: pecl + extensions: "${{ matrix.driver }}-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.driver }}.xml --coverage-clover=coverage.xml" + + - name: "Upload Code Coverage" + uses: "codecov/codecov-action@v1" + + phpunit-ibm-db2: + name: "PHPUnit with IBM DB2" + runs-on: "ubuntu-latest" + needs: phpunit-sqlite + + strategy: + matrix: + php-version: + - "7.3" + + 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: extension=ibm_db2.so, ibm_db2.instance_name=db2inst1 + + - name: "Install ibm_db2 extension" + run: "bash ./ci/github/install-db2-ibm_db2.sh ${{ 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: "Install dependencies with composer" + run: "composer install --no-interaction --no-progress --no-suggest" + + - name: "Run PHPUnit" + run: "vendor/bin/phpunit -c ci/github/phpunit.ibm_db2.xml --coverage-clover=coverage.xml" + + - name: "Upload Code Coverage" + uses: "codecov/codecov-action@v1" diff --git a/.travis.yml b/.travis.yml index 4621a9afa96..1058e82fb97 100644 --- a/.travis.yml +++ b/.travis.yml @@ -28,47 +28,6 @@ after_success: 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 @@ -77,108 +36,6 @@ jobs: - 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 diff --git a/tests/travis/install-db2-ibm_db2.sh b/ci/github/install-db2-ibm_db2.sh similarity index 67% rename from tests/travis/install-db2-ibm_db2.sh rename to ci/github/install-db2-ibm_db2.sh index b59bb6396fd..3b89fc76474 100644 --- a/tests/travis/install-db2-ibm_db2.sh +++ b/ci/github/install-db2-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 94% rename from tests/travis/ibm_db2.travis.xml rename to ci/github/phpunit.ibm_db2.xml index 3089c56c47a..fcba0b639f7 100644 --- a/tests/travis/ibm_db2.travis.xml +++ b/ci/github/phpunit.ibm_db2.xml @@ -19,7 +19,7 @@ - ../Doctrine/Tests/DBAL + ../../tests diff --git a/tests/travis/mysqli.docker.travis.xml b/ci/github/phpunit.mysql-mariadb.mysqli.xml similarity index 94% rename from tests/travis/mysqli.docker.travis.xml rename to ci/github/phpunit.mysql-mariadb.mysqli.xml index d93ca5ceda5..0a8808344cf 100644 --- a/tests/travis/mysqli.docker.travis.xml +++ b/ci/github/phpunit.mysql-mariadb.mysqli.xml @@ -19,7 +19,7 @@ - ../Doctrine/Tests/DBAL + ../../tests diff --git a/tests/travis/mariadb.docker.travis.xml b/ci/github/phpunit.mysql-mariadb.pdo_mysql.xml similarity index 94% rename from tests/travis/mariadb.docker.travis.xml rename to ci/github/phpunit.mysql-mariadb.pdo_mysql.xml index 67f63b2fde4..e54da2e3f32 100644 --- a/tests/travis/mariadb.docker.travis.xml +++ b/ci/github/phpunit.mysql-mariadb.pdo_mysql.xml @@ -19,7 +19,7 @@ - ../Doctrine/Tests/DBAL + ../../tests diff --git a/tests/travis/mysqli-tls.docker.travis.xml b/ci/github/phpunit.mysql-tls.mysqli.xml similarity index 95% rename from tests/travis/mysqli-tls.docker.travis.xml rename to ci/github/phpunit.mysql-tls.mysqli.xml index f6f653c42bf..febb7bf9a24 100644 --- a/tests/travis/mysqli-tls.docker.travis.xml +++ b/ci/github/phpunit.mysql-tls.mysqli.xml @@ -25,7 +25,7 @@ - ../Doctrine/Tests/DBAL + ../../tests diff --git a/tests/travis/pdo_sqlsrv.travis.xml b/ci/github/phpunit.pdo_sqlsrv.xml similarity index 94% rename from tests/travis/pdo_sqlsrv.travis.xml rename to ci/github/phpunit.pdo_sqlsrv.xml index 38802c599e9..3743e410a6b 100644 --- a/tests/travis/pdo_sqlsrv.travis.xml +++ b/ci/github/phpunit.pdo_sqlsrv.xml @@ -19,7 +19,7 @@ - ../Doctrine/Tests/DBAL + ../../tests diff --git a/tests/travis/mariadb.mysqli.docker.travis.xml b/ci/github/phpunit.pgsql.xml similarity index 75% rename from tests/travis/mariadb.mysqli.docker.travis.xml rename to ci/github/phpunit.pgsql.xml index d93ca5ceda5..3040a427815 100644 --- a/tests/travis/mariadb.mysqli.docker.travis.xml +++ b/ci/github/phpunit.pgsql.xml @@ -10,16 +10,16 @@ - - - - + + + + - ../Doctrine/Tests/DBAL + ../../tests diff --git a/tests/travis/mysql.docker.travis.xml b/ci/github/phpunit.sqlite.xml similarity index 69% rename from tests/travis/mysql.docker.travis.xml rename to ci/github/phpunit.sqlite.xml index 67f63b2fde4..c4726298521 100644 --- a/tests/travis/mysql.docker.travis.xml +++ b/ci/github/phpunit.sqlite.xml @@ -9,17 +9,11 @@ > - - - - - - - ../Doctrine/Tests/DBAL + ../../tests diff --git a/tests/travis/sqlsrv.travis.xml b/ci/github/phpunit.sqlsrv.xml similarity index 94% rename from tests/travis/sqlsrv.travis.xml rename to ci/github/phpunit.sqlsrv.xml index de56350ce9d..bec0b17883e 100644 --- a/tests/travis/sqlsrv.travis.xml +++ b/ci/github/phpunit.sqlsrv.xml @@ -19,7 +19,7 @@ - ../Doctrine/Tests/DBAL + ../../tests 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