From 3af9ecfa63fd816bfda237624638d44ab028c95a Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 16:15:57 +0300 Subject: [PATCH 01/22] Add mssql ci --- .github/workflows/ci-mssql.yml | 86 ++++++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 .github/workflows/ci-mssql.yml diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml new file mode 100644 index 00000000..8275e29e --- /dev/null +++ b/.github/workflows/ci-mssql.yml @@ -0,0 +1,86 @@ +on: + - pull_request + - push + +name: ci-mssql + +jobs: + tests: + name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }} + + env: + key: cache + + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - php: '7.2' + extensions: pdo, pdo_sqlsrv-5.8.1 + mssql: 'server:2017-latest' + - php: '7.3' + extensions: pdo, pdo_sqlsrv-5.8.1 + mssql: 'server:2017-latest' + - php: '7.4' + extensions: pdo, pdo_sqlsrv + mssql: 'server:2017-latest' + - php: '7.4' + extensions: pdo, pdo_sqlsrv + mssql: 'server:2019-latest' + - php: '8.0' + extensions: pdo, pdo_sqlsrv + mssql: 'server:2017-latest' + - php: '8.0' + extensions: pdo, pdo_sqlsrv + mssql: 'server:2019-latest' + + services: + mssql: + image: mcr.microsoft.com/mssql/${{ matrix.mssql }} + env: + SA_PASSWORD: YourStrong!Passw0rd + ACCEPT_EULA: Y + MSSQL_PID: Developer + ports: + - 1433:1433 + options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - name: Checkout + uses: actions/checkout@v2.3.4 + + - name: Create MS SQL Database + run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest' + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + extensions: ${{ matrix.extensions }} + ini-values: date.timezone='UTC' + tools: composer:v2, pecl + + - name: Determine composer cache directory on Linux + run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV + + - name: Cache dependencies installed with composer + uses: actions/cache@v2 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php }}-composer- + + - name: Update composer + run: composer self-update + + - name: Install dependencies with composer + run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Install dependencies with composer php 8.0 + if: matrix.php == '8.0' + run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Run tests with phpunit without coverage + run: vendor/bin/phpunit --group mssql --colors=always From 85bdc5bba8e3c95efd11c5a61632326715e75d62 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 16:21:26 +0300 Subject: [PATCH 02/22] Update CI --- .github/workflows/ci-mssql.yml | 2 +- .github/workflows/main.yml | 6 ------ 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml index 8275e29e..50de26e6 100644 --- a/.github/workflows/ci-mssql.yml +++ b/.github/workflows/ci-mssql.yml @@ -83,4 +83,4 @@ jobs: run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - name: Run tests with phpunit without coverage - run: vendor/bin/phpunit --group mssql --colors=always + run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e50f804..eda5f649 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -44,12 +44,6 @@ jobs: coverage: pcov tools: pecl extensions: mbstring, pdo, pdo_sqlsrv - - name: Install MS SQL Server deps - run: | - bash ./tests/install-sqlsrv.sh - sudo sed -i.bak '/^extension="pdo_sqlsrv.so"/d' /etc/php/${{ matrix.php-versions }}/cli/php.ini - sudo bash -c 'printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/${{ matrix.php-versions }}/mods-available/pdo_sqlsrv.ini' - sudo phpenmod -s cli -v ${{ matrix.php-versions }} pdo_sqlsrv - name: Get Composer Cache Directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" From 7242d814b5829ae5c97aca53de47d10fc1d7c45b Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 16:48:30 +0300 Subject: [PATCH 03/22] Update CI --- .github/workflows/ci-mssql.yml | 10 ++-- .github/workflows/ci-pgsql.yml | 89 ++++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 2 +- tests/bootstrap.php | 17 ++++++- 4 files changed, 112 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/ci-pgsql.yml diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml index 50de26e6..ad44b10d 100644 --- a/.github/workflows/ci-mssql.yml +++ b/.github/workflows/ci-mssql.yml @@ -39,19 +39,19 @@ jobs: mssql: image: mcr.microsoft.com/mssql/${{ matrix.mssql }} env: - SA_PASSWORD: YourStrong!Passw0rd + SA_PASSWORD: SSpaSS__1 ACCEPT_EULA: Y MSSQL_PID: Developer ports: - 1433:1433 - options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 + options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'SSpaSS__1' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - name: Checkout uses: actions/checkout@v2.3.4 - name: Create MS SQL Database - run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest' + run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'SSpaSS__1' -Q 'CREATE DATABASE spiral' - name: Install PHP with extensions uses: shivammathur/setup-php@v2 @@ -83,4 +83,6 @@ jobs: run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi - name: Run tests with phpunit without coverage - run: vendor/bin/phpunit --coverage-clover=coverage.xml --colors=always + env: + DB: sqlserver + run: vendor/bin/phpunit tests/Database/Driver/SQLServer --coverage-clover=coverage.xml --colors=always diff --git a/.github/workflows/ci-pgsql.yml b/.github/workflows/ci-pgsql.yml new file mode 100644 index 00000000..1951e5f4 --- /dev/null +++ b/.github/workflows/ci-pgsql.yml @@ -0,0 +1,89 @@ +on: + - pull_request + - push + +name: ci-pgsql + +jobs: + tests: + name: PHP ${{ matrix.php-version }}-pgsql-${{ matrix.pgsql-version }} + env: + extensions: curl, intl, pdo, pdo_pgsql + key: cache-v1 + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: + - ubuntu-latest + php-version: + - "7.2" + - "7.3" + - "7.4" + - "8.0" + + pgsql-version: + - "10" + - "11" + - "12" + - "13" + + services: + postgres: + image: postgres:${{ matrix.pgsql-version }} + env: + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + POSTGRES_DB: spiral + ports: + - 5432:5432 + options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup cache environment + id: cache-env + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php-version }} + extensions: ${{ env.extensions }} + key: ${{ env.key }} + + - name: Cache extensions + uses: actions/cache@v1 + with: + path: ${{ steps.cache-env.outputs.dir }} + key: ${{ steps.cache-env.outputs.key }} + restore-keys: ${{ steps.cache-env.outputs.key }} + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: ${{ env.extensions }} + ini-values: date.timezone='UTC' + coverage: pcov + + - name: Determine composer cache directory + if: matrix.os == 'ubuntu-latest' + run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV + + - name: Cache dependencies installed with composer + uses: actions/cache@v1 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- + + - name: Install dependencies with composer + run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Run pgsql tests with phpunit + env: + DB: postgres + POSTGRES: ${{ matrix.pgsql-version }} + run: vendor/bin/phpunit tests/Database/Driver/Postgres --colors=always diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eda5f649..b540f4fc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: php-version: ${{ matrix.php-versions }} coverage: pcov tools: pecl - extensions: mbstring, pdo, pdo_sqlsrv + extensions: mbstring, pdo, pdo_sqlite3 - name: Get Composer Cache Directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" diff --git a/tests/bootstrap.php b/tests/bootstrap.php index c94b6646..f7bc3b86 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -57,7 +57,7 @@ 'check' => static function () { return !in_array('sqlsrv', \PDO::getAvailableDrivers(), true); }, - 'conn' => 'sqlsrv:Server=127.0.0.1,11433;Database=tempdb', + 'conn' => 'sqlsrv:Server=127.0.0.1,11433;Database=spiral', 'user' => 'sa', 'pass' => 'SSpaSS__1', 'queryCache' => 100 @@ -66,6 +66,21 @@ if (!empty(getenv('DB'))) { switch (getenv('DB')) { + case 'sqlserver': + Database\Tests\BaseTest::$config = [ + 'debug' => false, + 'sqlserver' => [ + 'driver' => Database\Driver\SQLServer\SQLServerDriver::class, + 'check' => static function () { + return true; + }, + 'conn' => 'sqlsrv:Server=127.0.0.1,11433;Database=spiral', + 'user' => 'SA', + 'pass' => 'SSpaSS__1' + ], + ]; + break; + case 'postgres': Database\Tests\BaseTest::$config = [ 'debug' => false, From eccf4a2925693476618b8486f82620c5885da8b1 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 17:26:53 +0300 Subject: [PATCH 04/22] add ci for mysql --- .github/workflows/ci-mysql.yml | 86 +++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 88 +--------------------------------- 2 files changed, 88 insertions(+), 86 deletions(-) create mode 100644 .github/workflows/ci-mysql.yml diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml new file mode 100644 index 00000000..89375a2d --- /dev/null +++ b/.github/workflows/ci-mysql.yml @@ -0,0 +1,86 @@ +on: + - pull_request + - push + +name: ci-mysql + +jobs: + tests: + name: PHP ${{ matrix.php-version }}-mysql-${{ matrix.mysql-version }} + env: + extensions: curl, intl, pdo, pdo_mysql + key: cache-v1 + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: + - ubuntu-latest + + php-version: + - "7.2" + - "7.3" + - "7.4" + - "8.0" + + mysql-version: + - "latest" + + services: + mysql: + image: mysql:${{ matrix.mysql-version }} + env: + MYSQL_ROOT_PASSWORD: root + MYSQL_DATABASE: spiral + ports: + - 3306:3306 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup cache environment + id: cache-env + uses: shivammathur/cache-extensions@v1 + with: + php-version: ${{ matrix.php-version }} + extensions: ${{ env.extensions }} + key: ${{ env.key }} + + - name: Cache extensions + uses: actions/cache@v1 + with: + path: ${{ steps.cache-env.outputs.dir }} + key: ${{ steps.cache-env.outputs.key }} + restore-keys: ${{ steps.cache-env.outputs.key }} + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-version }} + extensions: ${{ env.extensions }} + ini-values: date.timezone='UTC' + coverage: pcov + + - name: Determine composer cache directory + if: matrix.os == 'ubuntu-latest' + run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV + + - name: Cache dependencies installed with composer + uses: actions/cache@v1 + with: + path: ${{ env.COMPOSER_CACHE_DIR }} + key: php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }} + restore-keys: | + php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- + + - name: Install dependencies with composer + run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + + - name: Run mysql tests with phpunit + env: + DB: mysql + MARIADB: ${{ matrix.configs.mariadb-version }} + run: vendor/bin/phpunit tests/Database/Driver/MySQL --colors=always diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b540f4fc..58fb1cd0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['7.2', '7.3', '7.4'] + php-versions: ['7.2', '7.3', '7.4', '8.0'] steps: - name: Checkout uses: actions/checkout@v2 @@ -43,7 +43,7 @@ jobs: php-version: ${{ matrix.php-versions }} coverage: pcov tools: pecl - extensions: mbstring, pdo, pdo_sqlite3 + extensions: mbstring, pdo, pdo_sqlite - name: Get Composer Cache Directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" @@ -63,87 +63,3 @@ jobs: with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml - test_postgres: - needs: lint - name: Test PostgreSQL ${{ matrix.configs.postgres-version }} - runs-on: ubuntu-latest - strategy: - matrix: - configs: [ - {php-version: 7.2, postgres-version: 9.6}, - {php-version: 7.3, postgres-version: 10}, - {php-version: 7.3, postgres-version: 11} - ] - services: - postgres: - image: postgres:${{ matrix.configs.postgres-version }} - ports: - - 5432:5432 - env: - POSTGRES_USER: postgres - POSTGRES_PASSWORD: postgres - POSTGRES_DB: spiral - options: --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup PHP ${{ matrix.configs.php-version }} - run: sudo update-alternatives --set php /usr/bin/php${{ matrix.configs.php-version }} - - name: Get Composer Cache Directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Restore Composer Cache - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install Dependencies - run: composer install --no-interaction --prefer-dist - - name: Execute Tests - env: - DB: postgres - POSTGRES: ${{ matrix.configs.postgres-version }} - run: | - vendor/bin/phpunit tests/Database/Driver/Postgres - test_mariadb: - needs: lint - name: Test MariaDB ${{ matrix.configs.mariadb-version }} - runs-on: ubuntu-latest - strategy: - matrix: - configs: [ -# {php-version: 7.2, mariadb-version: 10.2}, - {php-version: 7.3, mariadb-version: 10.4} - ] - services: - mariadb: - image: mariadb:${{ matrix.configs.mariadb-version }} - ports: - - 23306:3306 - env: - MYSQL_ROOT_PASSWORD: root - MYSQL_DATABASE: spiral - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Setup PHP ${{ matrix.configs.php-version }} - run: sudo update-alternatives --set php /usr/bin/php${{ matrix.configs.php-version }} - - name: Get Composer Cache Directory - id: composer-cache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - name: Restore Composer Cache - uses: actions/cache@v1 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- - - name: Install Dependencies - run: composer install --no-interaction --prefer-dist - - name: Execute Tests - env: - DB: mariadb - MARIADB: ${{ matrix.configs.mariadb-version }} - run: | - vendor/bin/phpunit tests/Database/Driver/MySQL From 1ba99a072d09ecfd4ff68d16ec5896234e4df184 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 17:32:53 +0300 Subject: [PATCH 05/22] hotfix --- .github/workflows/ci-mssql.yml | 2 +- tests/bootstrap.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml index ad44b10d..4e2ce516 100644 --- a/.github/workflows/ci-mssql.yml +++ b/.github/workflows/ci-mssql.yml @@ -85,4 +85,4 @@ jobs: - name: Run tests with phpunit without coverage env: DB: sqlserver - run: vendor/bin/phpunit tests/Database/Driver/SQLServer --coverage-clover=coverage.xml --colors=always + run: vendor/bin/phpunit tests/Database/Driver/SQLServer --colors=always diff --git a/tests/bootstrap.php b/tests/bootstrap.php index f7bc3b86..3003d453 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -37,7 +37,7 @@ 'check' => static function () { return !in_array('mysql', \PDO::getAvailableDrivers(), true); }, - 'conn' => 'mysql:host=127.0.0.1:13306;dbname=spiral', + 'conn' => 'mysql:host=127.0.0.1:3306;dbname=spiral', 'user' => 'root', 'pass' => 'root', 'queryCache' => 100 From c84edd0f18c69332e75779dba2978dae24bb5978 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 17:40:37 +0300 Subject: [PATCH 06/22] Fix port configs --- tests/bootstrap.php | 53 ++------------------------------------------- 1 file changed, 2 insertions(+), 51 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 3003d453..63ba2d40 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -47,7 +47,7 @@ 'check' => static function () { return !in_array('pgsql', \PDO::getAvailableDrivers(), true); }, - 'conn' => 'pgsql:host=127.0.0.1;port=15432;dbname=spiral', + 'conn' => 'pgsql:host=127.0.0.1;port=5432;dbname=spiral', 'user' => 'postgres', 'pass' => 'postgres', 'queryCache' => 100 @@ -57,58 +57,9 @@ 'check' => static function () { return !in_array('sqlsrv', \PDO::getAvailableDrivers(), true); }, - 'conn' => 'sqlsrv:Server=127.0.0.1,11433;Database=spiral', + 'conn' => 'sqlsrv:Server=127.0.0.1,1433;Database=spiral', 'user' => 'sa', 'pass' => 'SSpaSS__1', 'queryCache' => 100 ], ]; - -if (!empty(getenv('DB'))) { - switch (getenv('DB')) { - case 'sqlserver': - Database\Tests\BaseTest::$config = [ - 'debug' => false, - 'sqlserver' => [ - 'driver' => Database\Driver\SQLServer\SQLServerDriver::class, - 'check' => static function () { - return true; - }, - 'conn' => 'sqlsrv:Server=127.0.0.1,11433;Database=spiral', - 'user' => 'SA', - 'pass' => 'SSpaSS__1' - ], - ]; - break; - - case 'postgres': - Database\Tests\BaseTest::$config = [ - 'debug' => false, - 'postgres' => [ - 'driver' => Database\Driver\Postgres\PostgresDriver::class, - 'check' => static function () { - return true; - }, - 'conn' => 'pgsql:host=127.0.0.1;port=5432;dbname=spiral', - 'user' => 'postgres', - 'pass' => 'postgres' - ], - ]; - break; - - case 'mariadb': - Database\Tests\BaseTest::$config = [ - 'debug' => false, - 'mysql' => [ - 'driver' => Database\Driver\MySQL\MySQLDriver::class, - 'check' => static function () { - return true; - }, - 'conn' => 'mysql:host=127.0.0.1:23306;dbname=spiral', - 'user' => 'root', - 'pass' => 'root' - ], - ]; - break; - } -} From cdf3979245ccfc8f5cf8b1d9ec4053f9c24bd532 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 18:17:18 +0300 Subject: [PATCH 07/22] Update ci --- .github/workflows/ci-mysql.yml | 7 ++++--- .github/workflows/main.yml | 2 ++ tests/bootstrap.php | 18 ++++++++++-------- 3 files changed, 16 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml index 89375a2d..09bbf92b 100644 --- a/.github/workflows/ci-mysql.yml +++ b/.github/workflows/ci-mysql.yml @@ -25,7 +25,8 @@ jobs: - "8.0" mysql-version: - - "latest" + - "5.7" + - "8.0" services: mysql: @@ -35,7 +36,7 @@ jobs: MYSQL_DATABASE: spiral ports: - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 --default-authentication-plugin=mysql_native_password steps: - name: Checkout @@ -82,5 +83,5 @@ jobs: - name: Run mysql tests with phpunit env: DB: mysql - MARIADB: ${{ matrix.configs.mariadb-version }} + MYSQL: ${{ matrix.mysql-version }} run: vendor/bin/phpunit tests/Database/Driver/MySQL --colors=always diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 58fb1cd0..96f65007 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -56,6 +56,8 @@ jobs: - name: Install Dependencies run: composer install --no-interaction --prefer-dist - name: Execute Tests + env: + DB: sqlite run: | vendor/bin/phpunit --coverage-clover=coverage.xml - name: Upload coverage to Codecov diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 63ba2d40..64d7f7e9 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -20,12 +20,14 @@ //Composer require dirname(__DIR__) . '/vendor/autoload.php'; +$db = getenv('DB') ?: null; + Database\Tests\BaseTest::$config = [ 'debug' => false, 'sqlite' => [ 'driver' => Database\Driver\SQLite\SQLiteDriver::class, - 'check' => static function () { - return !in_array('sqlite', \PDO::getAvailableDrivers(), true); + 'check' => static function () use ($db) { + return $db === 'sqlite' || !in_array('sqlite', \PDO::getAvailableDrivers(), true); }, 'conn' => 'sqlite::memory:', 'user' => 'sqlite', @@ -34,8 +36,8 @@ ], 'mysql' => [ 'driver' => Database\Driver\MySQL\MySQLDriver::class, - 'check' => static function () { - return !in_array('mysql', \PDO::getAvailableDrivers(), true); + 'check' => static function () use ($db) { + return $db === 'mysql' || !in_array('mysql', \PDO::getAvailableDrivers(), true); }, 'conn' => 'mysql:host=127.0.0.1:3306;dbname=spiral', 'user' => 'root', @@ -44,8 +46,8 @@ ], 'postgres' => [ 'driver' => Database\Driver\Postgres\PostgresDriver::class, - 'check' => static function () { - return !in_array('pgsql', \PDO::getAvailableDrivers(), true); + 'check' => static function () use ($db) { + return $db === 'postgres' || !in_array('pgsql', \PDO::getAvailableDrivers(), true); }, 'conn' => 'pgsql:host=127.0.0.1;port=5432;dbname=spiral', 'user' => 'postgres', @@ -54,8 +56,8 @@ ], 'sqlserver' => [ 'driver' => Database\Driver\SQLServer\SQLServerDriver::class, - 'check' => static function () { - return !in_array('sqlsrv', \PDO::getAvailableDrivers(), true); + 'check' => static function () use ($db) { + return $db === 'sqlserver' || !in_array('sqlsrv', \PDO::getAvailableDrivers(), true); }, 'conn' => 'sqlsrv:Server=127.0.0.1,1433;Database=spiral', 'user' => 'sa', From 9beda21bf467503af687e1953d3db5a8681cae3c Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 18:27:51 +0300 Subject: [PATCH 08/22] Fix mysql ci --- .github/workflows/ci-mysql.yml | 3 ++- .github/workflows/main.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml index 09bbf92b..9f1c4728 100644 --- a/.github/workflows/ci-mysql.yml +++ b/.github/workflows/ci-mysql.yml @@ -34,9 +34,10 @@ jobs: env: MYSQL_ROOT_PASSWORD: root MYSQL_DATABASE: spiral + MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password ports: - 3306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 --default-authentication-plugin=mysql_native_password + options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - name: Checkout diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 96f65007..9e2daf75 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,7 +22,7 @@ jobs: run: composer install --no-interaction --prefer-dist - name: Check CS run: vendor/bin/spiral-cs check src tests - test: + sqlite: needs: lint name: Test PHP ${{ matrix.php-versions }} runs-on: ubuntu-latest From d7b3dfa74ac494516527c2fb23a9ad819e7a0575 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 18:48:15 +0300 Subject: [PATCH 09/22] fail-fast: false for mysql ci --- .github/workflows/ci-mysql.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml index 9f1c4728..a709773a 100644 --- a/.github/workflows/ci-mysql.yml +++ b/.github/workflows/ci-mysql.yml @@ -14,6 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: - ubuntu-latest From 412d27a61b1e939d7347dcfa06fe4fd59e011ebf Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 18:59:43 +0300 Subject: [PATCH 10/22] Remove php 7.2 and 7.3 from mysql ci --- .github/workflows/ci-mysql.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml index a709773a..91404987 100644 --- a/.github/workflows/ci-mysql.yml +++ b/.github/workflows/ci-mysql.yml @@ -20,8 +20,6 @@ jobs: - ubuntu-latest php-version: - - "7.2" - - "7.3" - "7.4" - "8.0" From 4b33701c0acc098cdb6a70e64c4d5397581210f6 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 19:08:10 +0300 Subject: [PATCH 11/22] Update strategy: fail-fast: false --- .github/workflows/ci-mssql.yml | 1 + .github/workflows/ci-pgsql.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml index 4e2ce516..82581b41 100644 --- a/.github/workflows/ci-mssql.yml +++ b/.github/workflows/ci-mssql.yml @@ -14,6 +14,7 @@ jobs: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: include: - php: '7.2' diff --git a/.github/workflows/ci-pgsql.yml b/.github/workflows/ci-pgsql.yml index 1951e5f4..13550677 100644 --- a/.github/workflows/ci-pgsql.yml +++ b/.github/workflows/ci-pgsql.yml @@ -14,6 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: + fail-fast: false matrix: os: - ubuntu-latest From 590004366868f6a882646d7a3da8d3d24714f670 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 19:19:57 +0300 Subject: [PATCH 12/22] Fix bootstrap --- .github/workflows/main.yml | 4 ++-- tests/bootstrap.php | 13 +++++++------ 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9e2daf75..1c825d48 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,9 +22,9 @@ jobs: run: composer install --no-interaction --prefer-dist - name: Check CS run: vendor/bin/spiral-cs check src tests - sqlite: + test: needs: lint - name: Test PHP ${{ matrix.php-versions }} + name: Test PHP ${{ matrix.php-versions }} with SQLite runs-on: ubuntu-latest strategy: matrix: diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 64d7f7e9..debc9d76 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -22,12 +22,11 @@ $db = getenv('DB') ?: null; -Database\Tests\BaseTest::$config = [ - 'debug' => false, +$drivers = [ 'sqlite' => [ 'driver' => Database\Driver\SQLite\SQLiteDriver::class, 'check' => static function () use ($db) { - return $db === 'sqlite' || !in_array('sqlite', \PDO::getAvailableDrivers(), true); + return $db === 'sqlite' || in_array('sqlite', \PDO::getAvailableDrivers(), true); }, 'conn' => 'sqlite::memory:', 'user' => 'sqlite', @@ -37,7 +36,7 @@ 'mysql' => [ 'driver' => Database\Driver\MySQL\MySQLDriver::class, 'check' => static function () use ($db) { - return $db === 'mysql' || !in_array('mysql', \PDO::getAvailableDrivers(), true); + return $db === 'mysql' || in_array('mysql', \PDO::getAvailableDrivers(), true); }, 'conn' => 'mysql:host=127.0.0.1:3306;dbname=spiral', 'user' => 'root', @@ -47,7 +46,7 @@ 'postgres' => [ 'driver' => Database\Driver\Postgres\PostgresDriver::class, 'check' => static function () use ($db) { - return $db === 'postgres' || !in_array('pgsql', \PDO::getAvailableDrivers(), true); + return $db === 'postgres' || in_array('pgsql', \PDO::getAvailableDrivers(), true); }, 'conn' => 'pgsql:host=127.0.0.1;port=5432;dbname=spiral', 'user' => 'postgres', @@ -57,7 +56,7 @@ 'sqlserver' => [ 'driver' => Database\Driver\SQLServer\SQLServerDriver::class, 'check' => static function () use ($db) { - return $db === 'sqlserver' || !in_array('sqlsrv', \PDO::getAvailableDrivers(), true); + return $db === 'sqlserver' || in_array('sqlsrv', \PDO::getAvailableDrivers(), true); }, 'conn' => 'sqlsrv:Server=127.0.0.1,1433;Database=spiral', 'user' => 'sa', @@ -65,3 +64,5 @@ 'queryCache' => 100 ], ]; + +Database\Tests\BaseTest::$config = ['debug' => false] + ($db === null ? $drivers : array_intersect_key($drivers, $db)); \ No newline at end of file From 1e9fe2b702a39de1ec267e0405416ca291c48300 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 19:22:27 +0300 Subject: [PATCH 13/22] Hotfix --- tests/bootstrap.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index debc9d76..44747206 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -65,4 +65,9 @@ ], ]; -Database\Tests\BaseTest::$config = ['debug' => false] + ($db === null ? $drivers : array_intersect_key($drivers, $db)); \ No newline at end of file +Database\Tests\BaseTest::$config = [ + 'debug' => false, + ] + ($db === null + ? $drivers + : array_intersect_key($drivers, array_flip((array)$db)) + ); \ No newline at end of file From f7c6863aa83ada979681c0b439359e009867b866 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 20:35:22 +0300 Subject: [PATCH 14/22] Add driver groups --- .github/workflows/ci-mssql.yml | 2 +- .github/workflows/ci-mysql.yml | 2 +- .github/workflows/ci-pgsql.yml | 2 +- .github/workflows/main.yml | 40 +++++++++++++++++-- .../Database/Driver/MySQL/AlterColumnTest.php | 4 ++ .../Driver/MySQL/BuildersAccessTest.php | 4 ++ .../Database/Driver/MySQL/ConsistencyTest.php | 4 ++ .../Database/Driver/MySQL/CreateTableTest.php | 4 ++ tests/Database/Driver/MySQL/DatabaseTest.php | 4 ++ .../Driver/MySQL/DatetimeColumnTest.php | 4 ++ .../Driver/MySQL/DefaultValueTest.php | 4 ++ .../Database/Driver/MySQL/DeleteQueryTest.php | 4 ++ .../Database/Driver/MySQL/ExceptionsTest.php | 4 ++ .../Database/Driver/MySQL/ForeignKeysTest.php | 4 ++ tests/Database/Driver/MySQL/IndexesTest.php | 4 ++ .../Database/Driver/MySQL/InsertQueryTest.php | 4 ++ tests/Database/Driver/MySQL/IsolationTest.php | 4 ++ .../Driver/MySQL/NestedQueriesTest.php | 4 ++ tests/Database/Driver/MySQL/ReflectorTest.php | 4 ++ .../Database/Driver/MySQL/SelectQueryTest.php | 4 ++ tests/Database/Driver/MySQL/StatementTest.php | 4 ++ tests/Database/Driver/MySQL/TableTest.php | 4 ++ .../Driver/MySQL/TransactionsTest.php | 4 ++ .../Database/Driver/MySQL/UpdateQueryTest.php | 4 ++ .../Driver/Postgres/AlterColumnTest.php | 4 ++ .../Driver/Postgres/BuildersAccessTest.php | 4 ++ .../Driver/Postgres/ConsistencyTest.php | 4 ++ .../Driver/Postgres/CreateTableTest.php | 4 ++ .../Database/Driver/Postgres/DatabaseTest.php | 4 ++ .../Driver/Postgres/DatetimeColumnTest.php | 4 ++ .../Driver/Postgres/DefaultValueTest.php | 4 ++ .../Driver/Postgres/DeleteQueryTest.php | 4 ++ .../Driver/Postgres/ExceptionsTest.php | 4 ++ .../Driver/Postgres/ForeignKeysTest.php | 4 ++ .../Database/Driver/Postgres/IndexesTest.php | 4 ++ .../Driver/Postgres/InsertQueryTest.php | 4 ++ .../Driver/Postgres/IsolationTest.php | 4 ++ .../Driver/Postgres/NestedQueriesTest.php | 4 ++ .../Driver/Postgres/ReflectorTest.php | 4 ++ .../Driver/Postgres/SelectQueryTest.php | 4 ++ .../Driver/Postgres/StatementTest.php | 4 ++ tests/Database/Driver/Postgres/TableTest.php | 4 ++ .../Driver/Postgres/TransactionsTest.php | 4 ++ .../Driver/Postgres/UpdateQueryTest.php | 4 ++ .../Driver/SQLServer/AlterColumnTest.php | 4 ++ .../Driver/SQLServer/BuildersAccessTest.php | 4 ++ .../Driver/SQLServer/ConsistencyTest.php | 4 ++ .../Driver/SQLServer/CreateTableTest.php | 4 ++ .../Driver/SQLServer/DatabaseTest.php | 4 ++ .../Driver/SQLServer/DatetimeColumnTest.php | 4 ++ .../Driver/SQLServer/DefaultValueTest.php | 4 ++ .../Driver/SQLServer/DeleteQueryTest.php | 4 ++ .../Driver/SQLServer/ExceptionsTest.php | 4 ++ .../Driver/SQLServer/ForeignKeysTest.php | 4 ++ .../Database/Driver/SQLServer/IndexesTest.php | 4 ++ .../Driver/SQLServer/InsertQueryTest.php | 4 ++ .../Driver/SQLServer/IsolationTest.php | 4 ++ .../Driver/SQLServer/NestedQueriesTest.php | 4 ++ .../Driver/SQLServer/ReflectorTest.php | 4 ++ .../Driver/SQLServer/SelectQueryTest.php | 4 ++ .../Driver/SQLServer/StatementTest.php | 4 ++ tests/Database/Driver/SQLServer/TableTest.php | 4 ++ .../Driver/SQLServer/TransactionsTest.php | 4 ++ .../Driver/SQLServer/UpdateQueryTest.php | 4 ++ .../Driver/SQLite/AlterColumnTest.php | 4 ++ .../Driver/SQLite/BuildersAccessTest.php | 4 ++ .../Driver/SQLite/ConsistencyTest.php | 4 ++ .../Driver/SQLite/CreateTableTest.php | 4 ++ tests/Database/Driver/SQLite/DatabaseTest.php | 4 ++ .../Driver/SQLite/DatetimeColumnTest.php | 4 ++ .../Driver/SQLite/DefaultValueTest.php | 4 ++ .../Driver/SQLite/DeleteQueryTest.php | 4 ++ .../Database/Driver/SQLite/ExceptionsTest.php | 4 ++ .../Driver/SQLite/ForeignKeysTest.php | 4 ++ tests/Database/Driver/SQLite/IndexesTest.php | 4 ++ .../Driver/SQLite/InsertQueryTest.php | 4 ++ .../Database/Driver/SQLite/IsolationTest.php | 4 ++ .../Driver/SQLite/NestedQueriesTest.php | 4 ++ .../Database/Driver/SQLite/ReflectorTest.php | 4 ++ .../Driver/SQLite/SelectQueryTest.php | 4 ++ .../Database/Driver/SQLite/StatementTest.php | 4 ++ tests/Database/Driver/SQLite/TableTest.php | 4 ++ .../Driver/SQLite/TransactionsTest.php | 4 ++ .../Driver/SQLite/UpdateQueryTest.php | 4 ++ tests/docker-compose.yml | 10 ++--- tests/generate.php | 7 +++- 86 files changed, 370 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml index 82581b41..a95cabfe 100644 --- a/.github/workflows/ci-mssql.yml +++ b/.github/workflows/ci-mssql.yml @@ -86,4 +86,4 @@ jobs: - name: Run tests with phpunit without coverage env: DB: sqlserver - run: vendor/bin/phpunit tests/Database/Driver/SQLServer --colors=always + run: vendor/bin/phpunit --group driver-sqlserver --colors=always diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml index 91404987..a638bfc4 100644 --- a/.github/workflows/ci-mysql.yml +++ b/.github/workflows/ci-mysql.yml @@ -84,4 +84,4 @@ jobs: env: DB: mysql MYSQL: ${{ matrix.mysql-version }} - run: vendor/bin/phpunit tests/Database/Driver/MySQL --colors=always + run: vendor/bin/phpunit --group driver-mysql --colors=always diff --git a/.github/workflows/ci-pgsql.yml b/.github/workflows/ci-pgsql.yml index 13550677..1f0ec164 100644 --- a/.github/workflows/ci-pgsql.yml +++ b/.github/workflows/ci-pgsql.yml @@ -87,4 +87,4 @@ jobs: env: DB: postgres POSTGRES: ${{ matrix.pgsql-version }} - run: vendor/bin/phpunit tests/Database/Driver/Postgres --colors=always + run: vendor/bin/phpunit --group driver-postgres --colors=always diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1c825d48..38345ed4 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: run: vendor/bin/spiral-cs check src tests test: needs: lint - name: Test PHP ${{ matrix.php-versions }} with SQLite + name: Test PHP ${{ matrix.php-versions }} with Code Coverage runs-on: ubuntu-latest strategy: matrix: @@ -56,12 +56,44 @@ jobs: - name: Install Dependencies run: composer install --no-interaction --prefer-dist - name: Execute Tests - env: - DB: sqlite run: | - vendor/bin/phpunit --coverage-clover=coverage.xml + vendor/bin/phpuni --coverage-clover=coverage.xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} file: ./coverage.xml + + sqlite: + needs: lint + name: SQLite PHP ${{ matrix.php-versions }} + runs-on: ubuntu-latest + strategy: + matrix: + php-versions: ['7.2', '7.3', '7.4', '8.0'] + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Setup PHP ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v1 + with: + php-version: ${{ matrix.php-versions }} + coverage: pcov + tools: pecl + extensions: mbstring, pdo, pdo_sqlite + - name: Get Composer Cache Directory + id: composer-cache + run: echo "::set-output name=dir::$(composer config cache-files-dir)" + - name: Restore Composer Cache + uses: actions/cache@v1 + with: + path: ${{ steps.composer-cache.outputs.dir }} + key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} + restore-keys: ${{ runner.os }}-composer- + - name: Install Dependencies + run: composer install --no-interaction --prefer-dist + - name: Execute Tests + env: + DB: sqlite + run: | + vendor/bin/phpuni --group driver-sqlite --colors=always diff --git a/tests/Database/Driver/MySQL/AlterColumnTest.php b/tests/Database/Driver/MySQL/AlterColumnTest.php index c9b4cf8b..23d954b2 100644 --- a/tests/Database/Driver/MySQL/AlterColumnTest.php +++ b/tests/Database/Driver/MySQL/AlterColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class AlterColumnTest extends \Spiral\Database\Tests\AlterColumnTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/BuildersAccessTest.php b/tests/Database/Driver/MySQL/BuildersAccessTest.php index 504595be..8d81c40e 100644 --- a/tests/Database/Driver/MySQL/BuildersAccessTest.php +++ b/tests/Database/Driver/MySQL/BuildersAccessTest.php @@ -13,6 +13,10 @@ use Spiral\Database\Driver\MySQL\Schema\MySQLTable; +/** + * @group driver + * @group driver-mysql + */ class BuildersAccessTest extends \Spiral\Database\Tests\BuildersAccessTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/ConsistencyTest.php b/tests/Database/Driver/MySQL/ConsistencyTest.php index 31d6934a..331f5cd5 100644 --- a/tests/Database/Driver/MySQL/ConsistencyTest.php +++ b/tests/Database/Driver/MySQL/ConsistencyTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class ConsistencyTest extends \Spiral\Database\Tests\ConsistencyTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/CreateTableTest.php b/tests/Database/Driver/MySQL/CreateTableTest.php index 384ba333..40c9e423 100644 --- a/tests/Database/Driver/MySQL/CreateTableTest.php +++ b/tests/Database/Driver/MySQL/CreateTableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class CreateTableTest extends \Spiral\Database\Tests\CreateTableTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/DatabaseTest.php b/tests/Database/Driver/MySQL/DatabaseTest.php index 3366b293..f352a25f 100644 --- a/tests/Database/Driver/MySQL/DatabaseTest.php +++ b/tests/Database/Driver/MySQL/DatabaseTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class DatabaseTest extends \Spiral\Database\Tests\DatabaseTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/DatetimeColumnTest.php b/tests/Database/Driver/MySQL/DatetimeColumnTest.php index 24bb2d0a..1e5088bc 100644 --- a/tests/Database/Driver/MySQL/DatetimeColumnTest.php +++ b/tests/Database/Driver/MySQL/DatetimeColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class DatetimeColumnTest extends \Spiral\Database\Tests\DatetimeColumnTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/DefaultValueTest.php b/tests/Database/Driver/MySQL/DefaultValueTest.php index 18580810..510b4f1e 100644 --- a/tests/Database/Driver/MySQL/DefaultValueTest.php +++ b/tests/Database/Driver/MySQL/DefaultValueTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class DefaultValueTest extends \Spiral\Database\Tests\DefaultValueTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/DeleteQueryTest.php b/tests/Database/Driver/MySQL/DeleteQueryTest.php index 0d43ef4a..33480764 100644 --- a/tests/Database/Driver/MySQL/DeleteQueryTest.php +++ b/tests/Database/Driver/MySQL/DeleteQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class DeleteQueryTest extends \Spiral\Database\Tests\DeleteQueryTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/ExceptionsTest.php b/tests/Database/Driver/MySQL/ExceptionsTest.php index 1fc3697e..071ab3e6 100644 --- a/tests/Database/Driver/MySQL/ExceptionsTest.php +++ b/tests/Database/Driver/MySQL/ExceptionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class ExceptionsTest extends \Spiral\Database\Tests\ExceptionsTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/ForeignKeysTest.php b/tests/Database/Driver/MySQL/ForeignKeysTest.php index 01276e56..d8a81156 100644 --- a/tests/Database/Driver/MySQL/ForeignKeysTest.php +++ b/tests/Database/Driver/MySQL/ForeignKeysTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class ForeignKeysTest extends \Spiral\Database\Tests\ForeignKeysTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/IndexesTest.php b/tests/Database/Driver/MySQL/IndexesTest.php index c81b11e8..1d6e9fa2 100644 --- a/tests/Database/Driver/MySQL/IndexesTest.php +++ b/tests/Database/Driver/MySQL/IndexesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class IndexesTest extends \Spiral\Database\Tests\IndexesTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/InsertQueryTest.php b/tests/Database/Driver/MySQL/InsertQueryTest.php index 469f0ddb..3e8f22e6 100644 --- a/tests/Database/Driver/MySQL/InsertQueryTest.php +++ b/tests/Database/Driver/MySQL/InsertQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class InsertQueryTest extends \Spiral\Database\Tests\InsertQueryTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/IsolationTest.php b/tests/Database/Driver/MySQL/IsolationTest.php index 9e4e599f..779844f2 100644 --- a/tests/Database/Driver/MySQL/IsolationTest.php +++ b/tests/Database/Driver/MySQL/IsolationTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class IsolationTest extends \Spiral\Database\Tests\IsolationTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/NestedQueriesTest.php b/tests/Database/Driver/MySQL/NestedQueriesTest.php index 1530d49c..cc77390f 100644 --- a/tests/Database/Driver/MySQL/NestedQueriesTest.php +++ b/tests/Database/Driver/MySQL/NestedQueriesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class NestedQueriesTest extends \Spiral\Database\Tests\NestedQueriesTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/ReflectorTest.php b/tests/Database/Driver/MySQL/ReflectorTest.php index f32cbe72..b363228b 100644 --- a/tests/Database/Driver/MySQL/ReflectorTest.php +++ b/tests/Database/Driver/MySQL/ReflectorTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class ReflectorTest extends \Spiral\Database\Tests\ReflectorTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/SelectQueryTest.php b/tests/Database/Driver/MySQL/SelectQueryTest.php index 44cf1d4d..7313a031 100644 --- a/tests/Database/Driver/MySQL/SelectQueryTest.php +++ b/tests/Database/Driver/MySQL/SelectQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class SelectQueryTest extends \Spiral\Database\Tests\SelectQueryTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/StatementTest.php b/tests/Database/Driver/MySQL/StatementTest.php index 57021683..5a7b67b5 100644 --- a/tests/Database/Driver/MySQL/StatementTest.php +++ b/tests/Database/Driver/MySQL/StatementTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class StatementTest extends \Spiral\Database\Tests\StatementTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/TableTest.php b/tests/Database/Driver/MySQL/TableTest.php index 989aac7d..0f283d01 100644 --- a/tests/Database/Driver/MySQL/TableTest.php +++ b/tests/Database/Driver/MySQL/TableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class TableTest extends \Spiral\Database\Tests\TableTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/TransactionsTest.php b/tests/Database/Driver/MySQL/TransactionsTest.php index 382b6bda..f3268814 100644 --- a/tests/Database/Driver/MySQL/TransactionsTest.php +++ b/tests/Database/Driver/MySQL/TransactionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class TransactionsTest extends \Spiral\Database\Tests\TransactionsTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/MySQL/UpdateQueryTest.php b/tests/Database/Driver/MySQL/UpdateQueryTest.php index d18c32b1..e5e916d6 100644 --- a/tests/Database/Driver/MySQL/UpdateQueryTest.php +++ b/tests/Database/Driver/MySQL/UpdateQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\MySQL; +/** + * @group driver + * @group driver-mysql + */ class UpdateQueryTest extends \Spiral\Database\Tests\UpdateQueryTest { public const DRIVER = 'mysql'; diff --git a/tests/Database/Driver/Postgres/AlterColumnTest.php b/tests/Database/Driver/Postgres/AlterColumnTest.php index bbd62bfc..b0fff186 100644 --- a/tests/Database/Driver/Postgres/AlterColumnTest.php +++ b/tests/Database/Driver/Postgres/AlterColumnTest.php @@ -13,6 +13,10 @@ use Spiral\Database\Exception\StatementException; +/** + * @group driver + * @group driver-postgres + */ class AlterColumnTest extends \Spiral\Database\Tests\AlterColumnTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/BuildersAccessTest.php b/tests/Database/Driver/Postgres/BuildersAccessTest.php index b587a4ff..7cdeaa48 100644 --- a/tests/Database/Driver/Postgres/BuildersAccessTest.php +++ b/tests/Database/Driver/Postgres/BuildersAccessTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class BuildersAccessTest extends \Spiral\Database\Tests\BuildersAccessTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/ConsistencyTest.php b/tests/Database/Driver/Postgres/ConsistencyTest.php index 2b3fb0be..5e148fa6 100644 --- a/tests/Database/Driver/Postgres/ConsistencyTest.php +++ b/tests/Database/Driver/Postgres/ConsistencyTest.php @@ -14,6 +14,10 @@ use Spiral\Database\Driver\Postgres\PostgresDriver; use Spiral\Database\Injection\FragmentInterface; +/** + * @group driver + * @group driver-postgres + */ class ConsistencyTest extends \Spiral\Database\Tests\ConsistencyTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/CreateTableTest.php b/tests/Database/Driver/Postgres/CreateTableTest.php index 1e2bbbfe..13c6d375 100644 --- a/tests/Database/Driver/Postgres/CreateTableTest.php +++ b/tests/Database/Driver/Postgres/CreateTableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class CreateTableTest extends \Spiral\Database\Tests\CreateTableTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/DatabaseTest.php b/tests/Database/Driver/Postgres/DatabaseTest.php index d7d7ba21..2b1f6d90 100644 --- a/tests/Database/Driver/Postgres/DatabaseTest.php +++ b/tests/Database/Driver/Postgres/DatabaseTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class DatabaseTest extends \Spiral\Database\Tests\DatabaseTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/DatetimeColumnTest.php b/tests/Database/Driver/Postgres/DatetimeColumnTest.php index ff9f9cd7..99727405 100644 --- a/tests/Database/Driver/Postgres/DatetimeColumnTest.php +++ b/tests/Database/Driver/Postgres/DatetimeColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class DatetimeColumnTest extends \Spiral\Database\Tests\DatetimeColumnTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/DefaultValueTest.php b/tests/Database/Driver/Postgres/DefaultValueTest.php index 7df417ae..c181216e 100644 --- a/tests/Database/Driver/Postgres/DefaultValueTest.php +++ b/tests/Database/Driver/Postgres/DefaultValueTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class DefaultValueTest extends \Spiral\Database\Tests\DefaultValueTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/DeleteQueryTest.php b/tests/Database/Driver/Postgres/DeleteQueryTest.php index deb7e576..88483642 100644 --- a/tests/Database/Driver/Postgres/DeleteQueryTest.php +++ b/tests/Database/Driver/Postgres/DeleteQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class DeleteQueryTest extends \Spiral\Database\Tests\DeleteQueryTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/ExceptionsTest.php b/tests/Database/Driver/Postgres/ExceptionsTest.php index c6d396ee..46627fcb 100644 --- a/tests/Database/Driver/Postgres/ExceptionsTest.php +++ b/tests/Database/Driver/Postgres/ExceptionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class ExceptionsTest extends \Spiral\Database\Tests\ExceptionsTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/ForeignKeysTest.php b/tests/Database/Driver/Postgres/ForeignKeysTest.php index 41f5914e..e85ace82 100644 --- a/tests/Database/Driver/Postgres/ForeignKeysTest.php +++ b/tests/Database/Driver/Postgres/ForeignKeysTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class ForeignKeysTest extends \Spiral\Database\Tests\ForeignKeysTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/IndexesTest.php b/tests/Database/Driver/Postgres/IndexesTest.php index 7af116e9..ba8ecf9f 100644 --- a/tests/Database/Driver/Postgres/IndexesTest.php +++ b/tests/Database/Driver/Postgres/IndexesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class IndexesTest extends \Spiral\Database\Tests\IndexesTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/InsertQueryTest.php b/tests/Database/Driver/Postgres/InsertQueryTest.php index abe5b32e..430cee3d 100644 --- a/tests/Database/Driver/Postgres/InsertQueryTest.php +++ b/tests/Database/Driver/Postgres/InsertQueryTest.php @@ -13,6 +13,10 @@ use Spiral\Database\Driver\Postgres\Query\PostgresInsertQuery; +/** + * @group driver + * @group driver-postgres + */ class InsertQueryTest extends \Spiral\Database\Tests\InsertQueryTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/IsolationTest.php b/tests/Database/Driver/Postgres/IsolationTest.php index d4e1badd..2271f0ed 100644 --- a/tests/Database/Driver/Postgres/IsolationTest.php +++ b/tests/Database/Driver/Postgres/IsolationTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class IsolationTest extends \Spiral\Database\Tests\IsolationTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/NestedQueriesTest.php b/tests/Database/Driver/Postgres/NestedQueriesTest.php index c33d060b..25d515c0 100644 --- a/tests/Database/Driver/Postgres/NestedQueriesTest.php +++ b/tests/Database/Driver/Postgres/NestedQueriesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class NestedQueriesTest extends \Spiral\Database\Tests\NestedQueriesTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/ReflectorTest.php b/tests/Database/Driver/Postgres/ReflectorTest.php index 626da1cf..fa070b58 100644 --- a/tests/Database/Driver/Postgres/ReflectorTest.php +++ b/tests/Database/Driver/Postgres/ReflectorTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class ReflectorTest extends \Spiral\Database\Tests\ReflectorTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/SelectQueryTest.php b/tests/Database/Driver/Postgres/SelectQueryTest.php index ba8cbdf8..6e8ec64a 100644 --- a/tests/Database/Driver/Postgres/SelectQueryTest.php +++ b/tests/Database/Driver/Postgres/SelectQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class SelectQueryTest extends \Spiral\Database\Tests\SelectQueryTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/StatementTest.php b/tests/Database/Driver/Postgres/StatementTest.php index 9c8942ee..32b4ffa3 100644 --- a/tests/Database/Driver/Postgres/StatementTest.php +++ b/tests/Database/Driver/Postgres/StatementTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class StatementTest extends \Spiral\Database\Tests\StatementTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/TableTest.php b/tests/Database/Driver/Postgres/TableTest.php index 04b425de..07e09bc4 100644 --- a/tests/Database/Driver/Postgres/TableTest.php +++ b/tests/Database/Driver/Postgres/TableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class TableTest extends \Spiral\Database\Tests\TableTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/TransactionsTest.php b/tests/Database/Driver/Postgres/TransactionsTest.php index 4030a3fb..62f5feac 100644 --- a/tests/Database/Driver/Postgres/TransactionsTest.php +++ b/tests/Database/Driver/Postgres/TransactionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class TransactionsTest extends \Spiral\Database\Tests\TransactionsTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/Postgres/UpdateQueryTest.php b/tests/Database/Driver/Postgres/UpdateQueryTest.php index cc0ce6b7..c01f3847 100644 --- a/tests/Database/Driver/Postgres/UpdateQueryTest.php +++ b/tests/Database/Driver/Postgres/UpdateQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\Postgres; +/** + * @group driver + * @group driver-postgres + */ class UpdateQueryTest extends \Spiral\Database\Tests\UpdateQueryTest { public const DRIVER = 'postgres'; diff --git a/tests/Database/Driver/SQLServer/AlterColumnTest.php b/tests/Database/Driver/SQLServer/AlterColumnTest.php index e0f391c3..a71764fe 100644 --- a/tests/Database/Driver/SQLServer/AlterColumnTest.php +++ b/tests/Database/Driver/SQLServer/AlterColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class AlterColumnTest extends \Spiral\Database\Tests\AlterColumnTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/BuildersAccessTest.php b/tests/Database/Driver/SQLServer/BuildersAccessTest.php index 714edcd1..47220a58 100644 --- a/tests/Database/Driver/SQLServer/BuildersAccessTest.php +++ b/tests/Database/Driver/SQLServer/BuildersAccessTest.php @@ -13,6 +13,10 @@ use Spiral\Database\Driver\SQLServer\Schema\SQLServerTable; +/** + * @group driver + * @group driver-sqlserver + */ class BuildersAccessTest extends \Spiral\Database\Tests\BuildersAccessTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/ConsistencyTest.php b/tests/Database/Driver/SQLServer/ConsistencyTest.php index fdc0267c..557250aa 100644 --- a/tests/Database/Driver/SQLServer/ConsistencyTest.php +++ b/tests/Database/Driver/SQLServer/ConsistencyTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class ConsistencyTest extends \Spiral\Database\Tests\ConsistencyTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/CreateTableTest.php b/tests/Database/Driver/SQLServer/CreateTableTest.php index 6691b68f..32fc144b 100644 --- a/tests/Database/Driver/SQLServer/CreateTableTest.php +++ b/tests/Database/Driver/SQLServer/CreateTableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class CreateTableTest extends \Spiral\Database\Tests\CreateTableTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/DatabaseTest.php b/tests/Database/Driver/SQLServer/DatabaseTest.php index 3d4e43b7..994e0d0b 100644 --- a/tests/Database/Driver/SQLServer/DatabaseTest.php +++ b/tests/Database/Driver/SQLServer/DatabaseTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class DatabaseTest extends \Spiral\Database\Tests\DatabaseTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/DatetimeColumnTest.php b/tests/Database/Driver/SQLServer/DatetimeColumnTest.php index 189fe0a0..7d447f60 100644 --- a/tests/Database/Driver/SQLServer/DatetimeColumnTest.php +++ b/tests/Database/Driver/SQLServer/DatetimeColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class DatetimeColumnTest extends \Spiral\Database\Tests\DatetimeColumnTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/DefaultValueTest.php b/tests/Database/Driver/SQLServer/DefaultValueTest.php index 3d459564..21a29570 100644 --- a/tests/Database/Driver/SQLServer/DefaultValueTest.php +++ b/tests/Database/Driver/SQLServer/DefaultValueTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class DefaultValueTest extends \Spiral\Database\Tests\DefaultValueTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/DeleteQueryTest.php b/tests/Database/Driver/SQLServer/DeleteQueryTest.php index 436c5b8f..71536172 100644 --- a/tests/Database/Driver/SQLServer/DeleteQueryTest.php +++ b/tests/Database/Driver/SQLServer/DeleteQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class DeleteQueryTest extends \Spiral\Database\Tests\DeleteQueryTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/ExceptionsTest.php b/tests/Database/Driver/SQLServer/ExceptionsTest.php index 38f7d26e..09b7fbeb 100644 --- a/tests/Database/Driver/SQLServer/ExceptionsTest.php +++ b/tests/Database/Driver/SQLServer/ExceptionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class ExceptionsTest extends \Spiral\Database\Tests\ExceptionsTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/ForeignKeysTest.php b/tests/Database/Driver/SQLServer/ForeignKeysTest.php index e06eaca9..59ab31e0 100644 --- a/tests/Database/Driver/SQLServer/ForeignKeysTest.php +++ b/tests/Database/Driver/SQLServer/ForeignKeysTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class ForeignKeysTest extends \Spiral\Database\Tests\ForeignKeysTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/IndexesTest.php b/tests/Database/Driver/SQLServer/IndexesTest.php index 70f8748f..60ceacfc 100644 --- a/tests/Database/Driver/SQLServer/IndexesTest.php +++ b/tests/Database/Driver/SQLServer/IndexesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class IndexesTest extends \Spiral\Database\Tests\IndexesTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/InsertQueryTest.php b/tests/Database/Driver/SQLServer/InsertQueryTest.php index 07bbe058..7ba991f0 100644 --- a/tests/Database/Driver/SQLServer/InsertQueryTest.php +++ b/tests/Database/Driver/SQLServer/InsertQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class InsertQueryTest extends \Spiral\Database\Tests\InsertQueryTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/IsolationTest.php b/tests/Database/Driver/SQLServer/IsolationTest.php index b9fd4d84..d698afdf 100644 --- a/tests/Database/Driver/SQLServer/IsolationTest.php +++ b/tests/Database/Driver/SQLServer/IsolationTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class IsolationTest extends \Spiral\Database\Tests\IsolationTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/NestedQueriesTest.php b/tests/Database/Driver/SQLServer/NestedQueriesTest.php index f6acffa2..aacb64a1 100644 --- a/tests/Database/Driver/SQLServer/NestedQueriesTest.php +++ b/tests/Database/Driver/SQLServer/NestedQueriesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class NestedQueriesTest extends \Spiral\Database\Tests\NestedQueriesTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/ReflectorTest.php b/tests/Database/Driver/SQLServer/ReflectorTest.php index 16d5fa1d..cf276613 100644 --- a/tests/Database/Driver/SQLServer/ReflectorTest.php +++ b/tests/Database/Driver/SQLServer/ReflectorTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class ReflectorTest extends \Spiral\Database\Tests\ReflectorTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/SelectQueryTest.php b/tests/Database/Driver/SQLServer/SelectQueryTest.php index 6ca21b15..9ff065b3 100644 --- a/tests/Database/Driver/SQLServer/SelectQueryTest.php +++ b/tests/Database/Driver/SQLServer/SelectQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class SelectQueryTest extends \Spiral\Database\Tests\SelectQueryTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/StatementTest.php b/tests/Database/Driver/SQLServer/StatementTest.php index 3d7ef45b..460ab2ef 100644 --- a/tests/Database/Driver/SQLServer/StatementTest.php +++ b/tests/Database/Driver/SQLServer/StatementTest.php @@ -13,6 +13,10 @@ use Spiral\Database\Driver\SQLServer\SQLServerCompiler; +/** + * @group driver + * @group driver-sqlserver + */ class StatementTest extends \Spiral\Database\Tests\StatementTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/TableTest.php b/tests/Database/Driver/SQLServer/TableTest.php index 841a1c18..baa8eb43 100644 --- a/tests/Database/Driver/SQLServer/TableTest.php +++ b/tests/Database/Driver/SQLServer/TableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class TableTest extends \Spiral\Database\Tests\TableTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/TransactionsTest.php b/tests/Database/Driver/SQLServer/TransactionsTest.php index 94dde817..6932641d 100644 --- a/tests/Database/Driver/SQLServer/TransactionsTest.php +++ b/tests/Database/Driver/SQLServer/TransactionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class TransactionsTest extends \Spiral\Database\Tests\TransactionsTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLServer/UpdateQueryTest.php b/tests/Database/Driver/SQLServer/UpdateQueryTest.php index 6fac17c5..7d5a6f53 100644 --- a/tests/Database/Driver/SQLServer/UpdateQueryTest.php +++ b/tests/Database/Driver/SQLServer/UpdateQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLServer; +/** + * @group driver + * @group driver-sqlserver + */ class UpdateQueryTest extends \Spiral\Database\Tests\UpdateQueryTest { public const DRIVER = 'sqlserver'; diff --git a/tests/Database/Driver/SQLite/AlterColumnTest.php b/tests/Database/Driver/SQLite/AlterColumnTest.php index 74865558..50ac22ff 100644 --- a/tests/Database/Driver/SQLite/AlterColumnTest.php +++ b/tests/Database/Driver/SQLite/AlterColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class AlterColumnTest extends \Spiral\Database\Tests\AlterColumnTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/BuildersAccessTest.php b/tests/Database/Driver/SQLite/BuildersAccessTest.php index 609ca570..46cb8208 100644 --- a/tests/Database/Driver/SQLite/BuildersAccessTest.php +++ b/tests/Database/Driver/SQLite/BuildersAccessTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class BuildersAccessTest extends \Spiral\Database\Tests\BuildersAccessTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/ConsistencyTest.php b/tests/Database/Driver/SQLite/ConsistencyTest.php index 09cb18b7..3e4db08e 100644 --- a/tests/Database/Driver/SQLite/ConsistencyTest.php +++ b/tests/Database/Driver/SQLite/ConsistencyTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class ConsistencyTest extends \Spiral\Database\Tests\ConsistencyTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/CreateTableTest.php b/tests/Database/Driver/SQLite/CreateTableTest.php index 16d7cd8a..dd35fd07 100644 --- a/tests/Database/Driver/SQLite/CreateTableTest.php +++ b/tests/Database/Driver/SQLite/CreateTableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class CreateTableTest extends \Spiral\Database\Tests\CreateTableTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/DatabaseTest.php b/tests/Database/Driver/SQLite/DatabaseTest.php index f334820d..b21e2d38 100644 --- a/tests/Database/Driver/SQLite/DatabaseTest.php +++ b/tests/Database/Driver/SQLite/DatabaseTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class DatabaseTest extends \Spiral\Database\Tests\DatabaseTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/DatetimeColumnTest.php b/tests/Database/Driver/SQLite/DatetimeColumnTest.php index 5cfd0bde..77943cbf 100644 --- a/tests/Database/Driver/SQLite/DatetimeColumnTest.php +++ b/tests/Database/Driver/SQLite/DatetimeColumnTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class DatetimeColumnTest extends \Spiral\Database\Tests\DatetimeColumnTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/DefaultValueTest.php b/tests/Database/Driver/SQLite/DefaultValueTest.php index 1b948057..817420ab 100644 --- a/tests/Database/Driver/SQLite/DefaultValueTest.php +++ b/tests/Database/Driver/SQLite/DefaultValueTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class DefaultValueTest extends \Spiral\Database\Tests\DefaultValueTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/DeleteQueryTest.php b/tests/Database/Driver/SQLite/DeleteQueryTest.php index 75e458e7..b285dd28 100644 --- a/tests/Database/Driver/SQLite/DeleteQueryTest.php +++ b/tests/Database/Driver/SQLite/DeleteQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class DeleteQueryTest extends \Spiral\Database\Tests\DeleteQueryTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/ExceptionsTest.php b/tests/Database/Driver/SQLite/ExceptionsTest.php index 13d1d5f9..dda07aea 100644 --- a/tests/Database/Driver/SQLite/ExceptionsTest.php +++ b/tests/Database/Driver/SQLite/ExceptionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class ExceptionsTest extends \Spiral\Database\Tests\ExceptionsTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/ForeignKeysTest.php b/tests/Database/Driver/SQLite/ForeignKeysTest.php index 2ad9db5b..97c0a423 100644 --- a/tests/Database/Driver/SQLite/ForeignKeysTest.php +++ b/tests/Database/Driver/SQLite/ForeignKeysTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class ForeignKeysTest extends \Spiral\Database\Tests\ForeignKeysTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/IndexesTest.php b/tests/Database/Driver/SQLite/IndexesTest.php index 1cbd324c..68f27024 100644 --- a/tests/Database/Driver/SQLite/IndexesTest.php +++ b/tests/Database/Driver/SQLite/IndexesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class IndexesTest extends \Spiral\Database\Tests\IndexesTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/InsertQueryTest.php b/tests/Database/Driver/SQLite/InsertQueryTest.php index 885674c2..cfb92007 100644 --- a/tests/Database/Driver/SQLite/InsertQueryTest.php +++ b/tests/Database/Driver/SQLite/InsertQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class InsertQueryTest extends \Spiral\Database\Tests\InsertQueryTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/IsolationTest.php b/tests/Database/Driver/SQLite/IsolationTest.php index abc302cd..704706dd 100644 --- a/tests/Database/Driver/SQLite/IsolationTest.php +++ b/tests/Database/Driver/SQLite/IsolationTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class IsolationTest extends \Spiral\Database\Tests\IsolationTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/NestedQueriesTest.php b/tests/Database/Driver/SQLite/NestedQueriesTest.php index 67713075..9f7ecc18 100644 --- a/tests/Database/Driver/SQLite/NestedQueriesTest.php +++ b/tests/Database/Driver/SQLite/NestedQueriesTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class NestedQueriesTest extends \Spiral\Database\Tests\NestedQueriesTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/ReflectorTest.php b/tests/Database/Driver/SQLite/ReflectorTest.php index 1504c8a7..be9d7ea8 100644 --- a/tests/Database/Driver/SQLite/ReflectorTest.php +++ b/tests/Database/Driver/SQLite/ReflectorTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class ReflectorTest extends \Spiral\Database\Tests\ReflectorTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/SelectQueryTest.php b/tests/Database/Driver/SQLite/SelectQueryTest.php index 3b8c16b4..888bfb34 100644 --- a/tests/Database/Driver/SQLite/SelectQueryTest.php +++ b/tests/Database/Driver/SQLite/SelectQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class SelectQueryTest extends \Spiral\Database\Tests\SelectQueryTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/StatementTest.php b/tests/Database/Driver/SQLite/StatementTest.php index 76f11737..fc527d70 100644 --- a/tests/Database/Driver/SQLite/StatementTest.php +++ b/tests/Database/Driver/SQLite/StatementTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class StatementTest extends \Spiral\Database\Tests\StatementTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/TableTest.php b/tests/Database/Driver/SQLite/TableTest.php index e0ad3ff6..e4a78ccc 100644 --- a/tests/Database/Driver/SQLite/TableTest.php +++ b/tests/Database/Driver/SQLite/TableTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class TableTest extends \Spiral\Database\Tests\TableTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/TransactionsTest.php b/tests/Database/Driver/SQLite/TransactionsTest.php index cfad6478..dfa0e6ee 100644 --- a/tests/Database/Driver/SQLite/TransactionsTest.php +++ b/tests/Database/Driver/SQLite/TransactionsTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class TransactionsTest extends \Spiral\Database\Tests\TransactionsTest { public const DRIVER = 'sqlite'; diff --git a/tests/Database/Driver/SQLite/UpdateQueryTest.php b/tests/Database/Driver/SQLite/UpdateQueryTest.php index e35e6b5a..84d32d60 100644 --- a/tests/Database/Driver/SQLite/UpdateQueryTest.php +++ b/tests/Database/Driver/SQLite/UpdateQueryTest.php @@ -11,6 +11,10 @@ namespace Spiral\Database\Tests\Driver\SQLite; +/** + * @group driver + * @group driver-sqlite + */ class UpdateQueryTest extends \Spiral\Database\Tests\UpdateQueryTest { public const DRIVER = 'sqlite'; diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 7951e779..67073645 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -4,17 +4,17 @@ services: sqlserver: image: microsoft/mssql-server-linux ports: - - "11433:1433" + - "1433:1433" environment: SA_PASSWORD: "SSpaSS__1" ACCEPT_EULA: "Y" mysql_latest: image: mysql:latest - restart: 'always' + restart: always command: --default-authentication-plugin=mysql_native_password ports: - - "13306:3306" + - "3306:3306" environment: MYSQL_DATABASE: "spiral" MYSQL_ROOT_PASSWORD: "root" @@ -24,8 +24,8 @@ services: image: postgres:12 restart: always ports: - - "15432:5432" + - "5432:5432" environment: POSTGRES_DB: "spiral" POSTGRES_USER: "postgres" - POSTGRES_PASSWORD: "postgres" \ No newline at end of file + POSTGRES_PASSWORD: "postgres" diff --git a/tests/generate.php b/tests/generate.php index ca212cd1..7adb422c 100644 --- a/tests/generate.php +++ b/tests/generate.php @@ -71,11 +71,16 @@ namespace %s; -class %s extends \%s +/** + * @group driver + * @group driver-%s + */ +class %s extends \\%s { const DRIVER = "%s"; }', $details['namespace'], + $driver, $class->getShortName(), $class->getName(), $driver From 13b1fdb24e377da879433d2d62532912f99c2b05 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 20:39:18 +0300 Subject: [PATCH 15/22] Typo fix --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 38345ed4..f66bfee2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -57,7 +57,7 @@ jobs: run: composer install --no-interaction --prefer-dist - name: Execute Tests run: | - vendor/bin/phpuni --coverage-clover=coverage.xml + vendor/bin/phpunit --coverage-clover=coverage.xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v1 with: @@ -96,4 +96,4 @@ jobs: env: DB: sqlite run: | - vendor/bin/phpuni --group driver-sqlite --colors=always + vendor/bin/phpunit --group driver-sqlite --colors=always From 20bbe0ccdeff344a2e11025764b33c278f754d1a Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 20:52:32 +0300 Subject: [PATCH 16/22] Update main job --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f66bfee2..16d36234 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: php-version: ${{ matrix.php-versions }} coverage: pcov tools: pecl - extensions: mbstring, pdo, pdo_sqlite + extensions: mbstring, pdo, pdo_sqlite, pdo_pgsql, pdo_sqlsrv, pdo_mysql - name: Get Composer Cache Directory id: composer-cache run: echo "::set-output name=dir::$(composer config cache-files-dir)" From 10872d1bbb7df37e5b550a336619520a0a8f56d1 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 20:57:43 +0300 Subject: [PATCH 17/22] Update main job --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 16d36234..201de1ec 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -38,7 +38,7 @@ jobs: docker-compose up -d cd .. - name: Setup PHP ${{ matrix.php-versions }} - uses: shivammathur/setup-php@v1 + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php-versions }} coverage: pcov @@ -59,6 +59,8 @@ jobs: run: | vendor/bin/phpunit --coverage-clover=coverage.xml - name: Upload coverage to Codecov + if: matrix.php == '7.4' + continue-on-error: true # if is fork uses: codecov/codecov-action@v1 with: token: ${{ secrets.CODECOV_TOKEN }} From ff67ee33076bd9dbf3dc0a3c2017e468f354e41f Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 21:21:06 +0300 Subject: [PATCH 18/22] Update mssql container --- .github/workflows/ci-mssql.yml | 3 --- tests/bootstrap.php | 4 ++-- tests/docker-compose.yml | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml index a95cabfe..a7217042 100644 --- a/.github/workflows/ci-mssql.yml +++ b/.github/workflows/ci-mssql.yml @@ -51,9 +51,6 @@ jobs: - name: Checkout uses: actions/checkout@v2.3.4 - - name: Create MS SQL Database - run: docker exec -i mssql /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'SSpaSS__1' -Q 'CREATE DATABASE spiral' - - name: Install PHP with extensions uses: shivammathur/setup-php@v2 with: diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 44747206..2e4f5ada 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -58,8 +58,8 @@ 'check' => static function () use ($db) { return $db === 'sqlserver' || in_array('sqlsrv', \PDO::getAvailableDrivers(), true); }, - 'conn' => 'sqlsrv:Server=127.0.0.1,1433;Database=spiral', - 'user' => 'sa', + 'conn' => 'sqlsrv:Server=127.0.0.1,1433;Database=tempdb', + 'user' => 'SA', 'pass' => 'SSpaSS__1', 'queryCache' => 100 ], diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index 67073645..c409389d 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -2,7 +2,7 @@ version: "3" services: sqlserver: - image: microsoft/mssql-server-linux + image: mcr.microsoft.com/mssql/server:2019-latest ports: - "1433:1433" environment: From 9690dc97e262fd9abf43459b18985c3a43638d57 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 21:29:04 +0300 Subject: [PATCH 19/22] Remove php 7.3 from main test matrix --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 201de1ec..c2a2b067 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-versions: ['7.2', '7.3', '7.4', '8.0'] + php-versions: ['7.2', '7.4', '8.0'] steps: - name: Checkout uses: actions/checkout@v2 From ddd326e522eaeabb6fb3e394ecc4a317037a7e7e Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 21:31:38 +0300 Subject: [PATCH 20/22] Restore db port values --- .github/workflows/ci-mssql.yml | 2 +- .github/workflows/ci-mysql.yml | 2 +- .github/workflows/ci-pgsql.yml | 2 +- tests/bootstrap.php | 6 +++--- tests/docker-compose.yml | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-mssql.yml b/.github/workflows/ci-mssql.yml index a7217042..007451fb 100644 --- a/.github/workflows/ci-mssql.yml +++ b/.github/workflows/ci-mssql.yml @@ -44,7 +44,7 @@ jobs: ACCEPT_EULA: Y MSSQL_PID: Developer ports: - - 1433:1433 + - 11433:1433 options: --name=mssql --health-cmd="/opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P 'SSpaSS__1' -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3 steps: diff --git a/.github/workflows/ci-mysql.yml b/.github/workflows/ci-mysql.yml index a638bfc4..afcce5fb 100644 --- a/.github/workflows/ci-mysql.yml +++ b/.github/workflows/ci-mysql.yml @@ -35,7 +35,7 @@ jobs: MYSQL_DATABASE: spiral MYSQL_AUTHENTICATION_PLUGIN: mysql_native_password ports: - - 3306:3306 + - 13306:3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: diff --git a/.github/workflows/ci-pgsql.yml b/.github/workflows/ci-pgsql.yml index 1f0ec164..4c31a6d2 100644 --- a/.github/workflows/ci-pgsql.yml +++ b/.github/workflows/ci-pgsql.yml @@ -38,7 +38,7 @@ jobs: POSTGRES_PASSWORD: postgres POSTGRES_DB: spiral ports: - - 5432:5432 + - 15432:5432 options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3 steps: diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 2e4f5ada..6fb031fb 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -38,7 +38,7 @@ 'check' => static function () use ($db) { return $db === 'mysql' || in_array('mysql', \PDO::getAvailableDrivers(), true); }, - 'conn' => 'mysql:host=127.0.0.1:3306;dbname=spiral', + 'conn' => 'mysql:host=127.0.0.1:13306;dbname=spiral', 'user' => 'root', 'pass' => 'root', 'queryCache' => 100 @@ -48,7 +48,7 @@ 'check' => static function () use ($db) { return $db === 'postgres' || in_array('pgsql', \PDO::getAvailableDrivers(), true); }, - 'conn' => 'pgsql:host=127.0.0.1;port=5432;dbname=spiral', + 'conn' => 'pgsql:host=127.0.0.1;port=15432;dbname=spiral', 'user' => 'postgres', 'pass' => 'postgres', 'queryCache' => 100 @@ -58,7 +58,7 @@ 'check' => static function () use ($db) { return $db === 'sqlserver' || in_array('sqlsrv', \PDO::getAvailableDrivers(), true); }, - 'conn' => 'sqlsrv:Server=127.0.0.1,1433;Database=tempdb', + 'conn' => 'sqlsrv:Server=127.0.0.1,11433;Database=tempdb', 'user' => 'SA', 'pass' => 'SSpaSS__1', 'queryCache' => 100 diff --git a/tests/docker-compose.yml b/tests/docker-compose.yml index c409389d..3ad3609a 100644 --- a/tests/docker-compose.yml +++ b/tests/docker-compose.yml @@ -4,7 +4,7 @@ services: sqlserver: image: mcr.microsoft.com/mssql/server:2019-latest ports: - - "1433:1433" + - "11433:1433" environment: SA_PASSWORD: "SSpaSS__1" ACCEPT_EULA: "Y" @@ -14,7 +14,7 @@ services: restart: always command: --default-authentication-plugin=mysql_native_password ports: - - "3306:3306" + - "13306:3306" environment: MYSQL_DATABASE: "spiral" MYSQL_ROOT_PASSWORD: "root" @@ -24,7 +24,7 @@ services: image: postgres:12 restart: always ports: - - "5432:5432" + - "15432:5432" environment: POSTGRES_DB: "spiral" POSTGRES_USER: "postgres" From f91e835afb34ec1c3c2246358139a8ff75312fd9 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 15 Mar 2021 22:19:15 +0300 Subject: [PATCH 21/22] Send Code coverage for all php versions --- .github/workflows/main.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c2a2b067..2896f219 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,7 +59,6 @@ jobs: run: | vendor/bin/phpunit --coverage-clover=coverage.xml - name: Upload coverage to Codecov - if: matrix.php == '7.4' continue-on-error: true # if is fork uses: codecov/codecov-action@v1 with: From 9473f06d751de63156135d41d4ea684daae9d001 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 16 Mar 2021 14:16:23 +0300 Subject: [PATCH 22/22] Remove redundant code --- tests/bootstrap.php | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 6fb031fb..9b928a0f 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -20,14 +20,9 @@ //Composer require dirname(__DIR__) . '/vendor/autoload.php'; -$db = getenv('DB') ?: null; - $drivers = [ 'sqlite' => [ 'driver' => Database\Driver\SQLite\SQLiteDriver::class, - 'check' => static function () use ($db) { - return $db === 'sqlite' || in_array('sqlite', \PDO::getAvailableDrivers(), true); - }, 'conn' => 'sqlite::memory:', 'user' => 'sqlite', 'pass' => '', @@ -35,9 +30,6 @@ ], 'mysql' => [ 'driver' => Database\Driver\MySQL\MySQLDriver::class, - 'check' => static function () use ($db) { - return $db === 'mysql' || in_array('mysql', \PDO::getAvailableDrivers(), true); - }, 'conn' => 'mysql:host=127.0.0.1:13306;dbname=spiral', 'user' => 'root', 'pass' => 'root', @@ -45,9 +37,6 @@ ], 'postgres' => [ 'driver' => Database\Driver\Postgres\PostgresDriver::class, - 'check' => static function () use ($db) { - return $db === 'postgres' || in_array('pgsql', \PDO::getAvailableDrivers(), true); - }, 'conn' => 'pgsql:host=127.0.0.1;port=15432;dbname=spiral', 'user' => 'postgres', 'pass' => 'postgres', @@ -55,9 +44,6 @@ ], 'sqlserver' => [ 'driver' => Database\Driver\SQLServer\SQLServerDriver::class, - 'check' => static function () use ($db) { - return $db === 'sqlserver' || in_array('sqlsrv', \PDO::getAvailableDrivers(), true); - }, 'conn' => 'sqlsrv:Server=127.0.0.1,11433;Database=tempdb', 'user' => 'SA', 'pass' => 'SSpaSS__1', @@ -65,9 +51,10 @@ ], ]; +$db = getenv('DB') ?: null; Database\Tests\BaseTest::$config = [ 'debug' => false, ] + ($db === null ? $drivers : array_intersect_key($drivers, array_flip((array)$db)) - ); \ No newline at end of file + );