Skip to content

Commit

Permalink
Use only PHP 8.3 for testing ActiveRecord and DbMigration (#907)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigrov authored Dec 7, 2024
1 parent cc8ae67 commit 49c71e6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 33 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/active-record.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -83,19 +74,18 @@ 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'

- 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
Expand Down Expand Up @@ -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
20 changes: 5 additions & 15 deletions .github/workflows/db-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 49c71e6

Please sign in to comment.