Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 5 additions & 24 deletions .github/workflows/active-record.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
on:
pull_request:
paths:
paths: &paths
- 'src/**'
- '.github/workflows/active-record.yml'
- 'composer.json'

push:
branches: ['master']
paths:
- 'src/**'
- '.github/workflows/active-record.yml'
- 'composer.json'
paths: *paths

name: active-record

Expand All @@ -23,7 +20,6 @@ jobs:
name: ActiveRecord

env:
COMPOSER_ROOT_VERSION: 2.0.1
PHP_VERSION: 8.5
EXTENSIONS: pdo_mysql, pdo_oci, pdo_pgsql, pdo_sqlite, pdo_sqlsrv

Expand Down Expand Up @@ -86,7 +82,7 @@ jobs:
run: docker exec -i mssql /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE [ar-test]'

- name: Checkout.
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
Expand All @@ -99,26 +95,11 @@ jobs:
- name: Install AR dependencies
run: composer require yiisoft/cache yiisoft/factory yiisoft/middleware-dispatcher yiisoft/test-support

- name: Install db-sqlite, db-mysql, db-mssql and db-oracle.
uses: yiisoft/actions/install-packages@master
with:
composer-root-version: 2.0.0
packages: >-
['db-sqlite', 'db-mysql', 'db-mssql', 'db-oracle']

- name: Install db-pgsql.
uses: yiisoft/actions/install-packages@master
with:
composer-root-version: 2.0.1
packages: >-
['db-pgsql']

- name: Install active-record.
- name: Install db-sqlite, db-mysql, db-pgsql, db-mssql, db-oracle and active-record.
uses: yiisoft/actions/install-packages@master
with:
composer-root-version: 1.0.0
packages: >-
['active-record']
['db-sqlite', 'db-mysql', 'db-pgsql', 'db-mssql', 'db-oracle', 'active-record']

- name: Run tests with phpunit with code coverage.
run: vendor/bin/phpunit --testsuite ActiveRecord --coverage-clover=coverage.xml --colors=always --display-warnings --display-deprecations
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/bc.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
on:
pull_request:
paths:
paths: &paths
- 'src/**'
- '.github/workflows/bc.yml'
- 'composer.json'
push:
branches: ['master']
paths:
- 'src/**'
- '.github/workflows/bc.yml'
- 'composer.json'
paths: *paths

name: backwards compatibility

Expand All @@ -21,7 +18,5 @@ jobs:
roave_bc_check:
uses: yiisoft/actions/.github/workflows/bc.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.5']
11 changes: 3 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
pull_request:
paths:
paths: &paths
- 'src/**'
- 'tests/**'
- '.github/workflows/build.yml'
Expand All @@ -9,12 +9,7 @@ on:

push:
branches: ['master']
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/build.yml'
- 'composer.json'
- 'phpunit.xml.dist'
paths: *paths

name: build

Expand Down Expand Up @@ -46,7 +41,7 @@ jobs:

steps:
- name: Checkout.
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
pull_request:
paths:
paths: &paths
- 'src/**'
- 'config/**'
- '.github/workflows/composer-require-checker.yml'
Expand All @@ -9,12 +9,7 @@ on:

push:
branches: ['master']
paths:
- 'src/**'
- 'config/**'
- '.github/workflows/composer-require-checker.yml'
- 'composer.json'
- 'composer-require-checker.json'
paths: *paths

name: Composer require checker

Expand Down
88 changes: 24 additions & 64 deletions .github/workflows/db-mariadb.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
pull_request:
paths:
paths: &paths
- 'src/**'
- 'tests/**'
- '.github/workflows/db-mariadb.yml'
Expand All @@ -9,90 +9,50 @@ on:

push:
branches: ['master']
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/db-mariadb.yml'
- 'composer.json'
- 'phpunit.xml.dist'
paths: *paths

name: db-mariadb

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
tests:
name: PHP ${{ matrix.php }}-mariadb-${{ matrix.mariadb }}

env:
COMPOSER_ROOT_VERSION: 2.0.0
EXTENSIONS: pdo_mysql
YII_MYSQL_TYPE: 'mariadb'

runs-on: ubuntu-latest
name: MariaDB ${{ matrix.mariadb }}

strategy:
matrix:
php:
- 8.5

mariadb:
- mariadb:10.4
- mariadb:10.5
- mariadb:10.6
- mariadb:10.7
- mariadb:10.8
- mariadb:10.9
- mariadb:latest
- 10.4
- 10.5
- 10.6
- 10.7
- 10.8
- 10.9
- latest

include:
- php: 8.1
mariadb: mariadb:latest
mariadb: latest
- php: 8.2
mariadb: mariadb:latest
mariadb: latest
- php: 8.3
mariadb: mariadb:latest
mariadb: latest
- php: 8.4
mariadb: mariadb:latest

services:
mysql:
image: ${{ matrix.mariadb }}
env:
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: true
MARIADB_ROOT_PASSWORD: ''
MARIADB_DATABASE: yiitest
ports:
- 3306:3306
options: --health-cmd="mariadb-admin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: Checkout.
uses: actions/checkout@v4

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.EXTENSIONS }}
ini-values: date.timezone='UTC'
coverage: pcov

- name: Install db-mysql.
uses: yiisoft/actions/install-packages@master
with:
composer-root-version: 2.0.0
packages: >-
['db-mysql']
mariadb: latest

- name: Run Mysql tests with phpunit and code coverage.
run: vendor/bin/phpunit --testsuite Mysql --coverage-clover=coverage.xml --colors=always --display-warnings --display-deprecations
uses: yiisoft/actions/.github/workflows/db-mariadb.yml@master
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
mariadb: ${{ matrix.mariadb }}
php: >-
[${{ matrix.php }}]

- name: Upload coverage to Codecov.
if: matrix.php == '8.5'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
15 changes: 3 additions & 12 deletions .github/workflows/db-migration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
name: DbMigration

env:
COMPOSER_ROOT_VERSION: 2.0.1
PHP_VERSION: 8.5
EXTENSIONS: pdo_mysql, pdo_oci, pdo_pgsql, pdo_sqlite, pdo_sqlsrv

Expand Down Expand Up @@ -83,7 +82,7 @@ jobs:
run: docker exec -i mssql /opt/mssql-tools18/bin/sqlcmd -C -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'

- name: Checkout.
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
Expand All @@ -96,19 +95,11 @@ jobs:
- name: Install yiisoft/test-support and yiisoft/yii-console
run: composer require yiisoft/test-support yiisoft/yii-console

- name: Install db-sqlite, db-mysql, db-mssql and db-oracle and db-migration.
- name: Install db-sqlite, db-mysql, db-pgsql, db-mssql and db-oracle and db-migration.
uses: yiisoft/actions/install-packages@master
with:
composer-root-version: 2.0.0
packages: >-
['db-sqlite', 'db-mysql', 'db-mssql', 'db-oracle', 'db-migration']

- name: Install db-pgsql.
uses: yiisoft/actions/install-packages@master
with:
composer-root-version: 2.0.1
packages: >-
['db-pgsql']
['db-sqlite', 'db-mysql', 'db-pgsql', 'db-mssql', 'db-oracle', 'db-migration']

- name: Run tests with phpunit with code coverage.
run: vendor/bin/phpunit --testsuite=DbMigration --coverage-clover=coverage.xml --colors=always --display-warnings --display-deprecations
Expand Down
50 changes: 6 additions & 44 deletions .github/workflows/db-mssql-2017.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
pull_request:
paths:
paths: &paths
- 'src/**'
- 'tests/**'
- '.github/workflows/db-mssql-2017.yml'
Expand All @@ -9,15 +9,13 @@ on:

push:
branches: ['master']
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/db-mssql-2017.yml'
- 'composer.json'
- 'phpunit.xml.dist'
paths: *paths

name: db-mssql-2017

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -26,40 +24,4 @@ jobs:
tests:
name: MSSQL 2017 (Windows)

env:
COMPOSER_ROOT_VERSION: 2.0.0
PHP_VERSION: 8.5
EXTENSIONS: pdo_sqlsrv

runs-on: windows-latest

steps:
- name: Install SQL Server on Windows.
run: choco install sql-server-express --version=2017.20190916 -y --no-progress --ia="'/Q /SUPPRESSPRIVACYSTATEMENTNOTICE /IACCEPTSQLSERVERLICENSETERMS /ACTION=install /INSTANCEID=MSSQLSERVER /INSTANCENAME=MSSQLSERVER /UPDATEENABLED=FALSE /SECURITYMODE=SQL /TCPENABLED=1 /SAPWD=YourStrong!Passw0rd'"

- name: Create database.
run: sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'

- name: Checkout.
uses: actions/checkout@v4

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
extensions: ${{ env.EXTENSIONS }}
ini-values: date.timezone='UTC'
coverage: pcov
env:
update: true

- name: Install db-mssql.
uses: yiisoft/actions/install-packages@master
with:
composer-root-version: 2.0.0
packages: >-
['db-mssql']

- name: Run mssql tests with phpunit and code coverage.
run: vendor/bin/phpunit --testsuite Mssql --coverage-clover=coverage.xml --colors=always --display-warnings --display-deprecations

uses: yiisoft/actions/.github/workflows/db-mssql-2017.yml@master
Loading
Loading