Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add docs for testing. #288

Merged
merged 24 commits into from
Jan 5, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
6 changes: 5 additions & 1 deletion .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ on:

name: Composer require checker

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

jobs:
composer-require-checker:
uses: yiisoft/actions/.github/workflows/composer-require-checker.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.0', '8.1']
['8.1', '8.2', '8.3']
6 changes: 5 additions & 1 deletion .github/workflows/db-mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:

name: db-mssql

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

jobs:
build:
name: PHP ${{ matrix.php }}
Expand All @@ -38,9 +42,9 @@ jobs:
- ubuntu-latest

php:
- 8.0
- 8.1
- 8.2
- 8.3

services:
mssql:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/db-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:

name: db-mysql

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

jobs:
build:
name: PHP ${{ matrix.php }}
Expand All @@ -38,9 +42,9 @@ jobs:
- ubuntu-latest

php:
- 8.0
- 8.1
- 8.2
- 8.3

services:
mysql:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/db-oracle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:

name: db-oracle

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

jobs:
build:
name: PHP ${{ matrix.php }}
Expand All @@ -38,9 +42,9 @@ jobs:
- ubuntu-latest

php:
- 8.0
- 8.1
- 8.2
- 8.3

services:
oci:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/db-pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:

name: db-pgsql

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

jobs:
build:
name: PHP ${{ matrix.php }}
Expand All @@ -38,9 +42,9 @@ jobs:
- ubuntu-latest

php:
- 8.0
- 8.1
- 8.2
- 8.3

services:
postgres:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/db-sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:

name: db-sqlite

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

jobs:
build:
name: PHP ${{ matrix.php }}-sqlite-${{ matrix.os }}
Expand All @@ -39,9 +43,9 @@ jobs:
- windows-latest

php:
- 8.0
- 8.1
- 8.2
- 8.3

steps:
- name: Checkout.
Expand Down
47 changes: 9 additions & 38 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@ on:

name: mutation

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

jobs:
mutation:
name: PHP ${{ matrix.php }}-${{ matrix.os }}

env:
extensions: pdo, pdo_mysql, pdo_oci, pdo_pgsql, pdo_sqlite, pdo_sqlsrv-5.10.0-beta2, oci8
extensions: pdo, pdo_pgsql

runs-on: ${{ matrix.os }}

Expand All @@ -34,39 +38,9 @@ jobs:
- ubuntu-latest

php:
- 8.0
- 8.1

services:
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
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
mysql:
image: mysql:latest
env:
MYSQL_ALLOW_EMPTY_PASSWORD: true
MYSQL_PASSWORD: ''
MYSQL_DATABASE: yiitest
ports:
- 3306:3306
options: --name=mysql --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
oci:
image: gvenzl/oracle-xe:latest
ports:
- 1521:1521
env:
ORACLE_PASSWORD : root
options: >-
--name=oci
--health-cmd healthcheck.sh
--health-interval 10s
--health-timeout 5s
--health-retries 10
postgres:
image: postgres:14
env:
Expand All @@ -81,9 +55,6 @@ jobs:
- name: Checkout.
uses: actions/checkout@v3

- 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:
Expand All @@ -96,11 +67,11 @@ jobs:
- name: Update composer.
run: composer self-update

- name: Install db drivers.
run: composer require 'yiisoft/db-mssql:dev-master' 'yiisoft/db-mysql:dev-master' 'yiisoft/db-oracle:dev-master' 'yiisoft/db-pgsql:dev-master' 'yiisoft/db-sqlite:dev-master' --no-interaction --no-progress --optimize-autoloader --ansi
- name: Install db-pgsql.
run: composer require yiisoft/db-pgsql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run infection.
run: |
vendor/bin/roave-infection-static-analysis-plugin -j2 --ignore-msi-with-no-mutations --only-covered
vendor/bin/roave-infection-static-analysis-plugin --threads=2 --ignore-msi-with-no-mutations --only-covered --test-framework-options="--testsuite=Pgsql"
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
6 changes: 5 additions & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,15 @@ on:

name: rector

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

jobs:
rector:
uses: yiisoft/actions/.github/workflows/rector.yml@master
with:
os: >-
['ubuntu-latest']
php: >-
['8.0']
['8.1']
7 changes: 6 additions & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:

name: static analysis

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

jobs:
mutation:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
Expand All @@ -33,8 +37,9 @@ jobs:
- ubuntu-latest

php:
- 8.0
- 8.1
- 8.2
- 8.3

steps:
- name: Checkout
Expand Down
Loading