From 49c71e65f77313602372391e7bee61842299ed6d Mon Sep 17 00:00:00 2001 From: Sergei Tigrov Date: Sat, 7 Dec 2024 09:03:19 +0700 Subject: [PATCH] Use only PHP 8.3 for testing `ActiveRecord` and `DbMigration` (#907) --- .github/workflows/active-record.yml | 25 +++++++------------------ .github/workflows/db-migration.yml | 20 +++++--------------- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/.github/workflows/active-record.yml b/.github/workflows/active-record.yml index 0886fc101..3dfa755d2 100644 --- a/.github/workflows/active-record.yml +++ b/.github/workflows/active-record.yml @@ -16,23 +16,14 @@ name: active-record jobs: tests: - name: PHP ${{ matrix.php }}-active-record-${{ matrix.os }} + name: ActiveRecord env: COMPOSER_ROOT_VERSION: dev-master - EXTENSIONS: pdo, pdo_mysql, pdo_oci, pdo_pgsql, pdo_sqlite, pdo_sqlsrv-5.12 + PHP_VERSION: 8.3 + EXTENSIONS: pdo, pdo_mysql, pdo_oci, pdo_pgsql, pdo_sqlite, pdo_sqlsrv - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - - php: - - 8.1 - - 8.2 - - 8.3 + runs-on: ubuntu-latest services: mysql: @@ -83,7 +74,7 @@ jobs: sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 - name: Checkout. - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Create MS SQL Database. run: docker exec -i mssql /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest' @@ -91,11 +82,10 @@ jobs: - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php }} + php-version: ${{ env.PHP_VERSION }} extensions: ${{ env.EXTENSIONS }} ini-values: date.timezone='UTC' coverage: pcov - tools: composer:v2, pecl - name: Update composer. run: composer self-update @@ -170,8 +160,7 @@ jobs: run: vendor/bin/phpunit --testsuite ActiveRecord --coverage-clover=coverage.xml --colors=always --display-warnings --display-deprecations - name: Upload coverage to Codecov. - if: matrix.php == '8.3' - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml diff --git a/.github/workflows/db-migration.yml b/.github/workflows/db-migration.yml index 022b84592..c8d8fa3f1 100644 --- a/.github/workflows/db-migration.yml +++ b/.github/workflows/db-migration.yml @@ -16,23 +16,14 @@ name: db-migration jobs: tests: - name: PHP ${{ matrix.php }}-db-migration-${{ matrix.os }} + name: DbMigration env: COMPOSER_ROOT_VERSION: dev-master + PHP_VERSION: 8.3 EXTENSIONS: pdo, pdo_mysql, pdo_oci, pdo_pgsql, pdo_sqlite, pdo_sqlsrv - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: - - ubuntu-latest - - php: - - 8.1 - - 8.2 - - 8.3 + runs-on: ubuntu-latest services: mysql: @@ -91,7 +82,7 @@ jobs: - name: Install PHP with extensions. uses: shivammathur/setup-php@v2 with: - php-version: ${{ matrix.php }} + php-version: ${{ env.PHP_VERSION }} extensions: ${{ env.EXTENSIONS }} ini-values: date.timezone='UTC' coverage: pcov @@ -166,8 +157,7 @@ jobs: run: vendor/bin/phpunit --testsuite=DbMigration --coverage-clover=coverage.xml --colors=always --display-warnings --display-deprecations - name: Upload coverage to Codecov. - if: matrix.php == '8.3' - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml