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

Update workflows #310

Merged
merged 9 commits into from
Jul 28, 2024
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
72 changes: 33 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,75 +1,69 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/build.yml'
- 'composer.json'
- 'phpunit.xml.dist'

push:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'
branches: ['master']
paths:
- 'src/**'
- 'tests/**'
- '.github/workflows/build.yml'
- 'composer.json'
- 'phpunit.xml.dist'

name: build

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

env:
COMPOSER_ROOT_VERSION: 1.0.0
EXTENSIONS: pdo, pdo_sqlsrv-5.10.1

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

strategy:
matrix:
os:
- ubuntu-latest

php:
- 8.0
- 8.1
- 8.2
- 8.3

mssql:
- server:2017-latest
- server:2019-latest
- server:2022-latest

exclude:
- php: 8.0
mssql: server:2017-latest
- php: 8.1
mssql: server:2017-latest
- server: 2022-latest
odbc-version: 18
flag: "-C"

include:
- php: 8.3
mssql: {server: 2017-latest}
- php: 8.3
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
image: mcr.microsoft.com/mssql/server:${{ matrix.mssql.server }}
env:
SA_PASSWORD: YourStrong!Passw0rd
ACCEPT_EULA: Y
MSSQL_PID: Developer
ports:
- 1433:1433
options: --name=mssql --health-cmd="/opt/mssql-tools${{ matrix.mssql.odbc-version }}/bin/sqlcmd ${{ matrix.mssql.flag }} -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@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'
run: docker exec -i mssql /opt/mssql-tools${{ matrix.mssql.odbc-version }}/bin/sqlcmd ${{ matrix.mssql.flag }} -S localhost -U SA -P 'YourStrong!Passw0rd' -Q 'CREATE DATABASE yiitest'

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
Expand Down
28 changes: 10 additions & 18 deletions .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'
paths:
- 'src/**'
- '.github/workflows/composer-require-checker.yml'
- 'composer.json'

push:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
- 'psalm.xml'
branches: ['master']
paths:
- 'src/**'
- '.github/workflows/composer-require-checker.yml'
- 'composer.json'

name: Composer require checker

Expand All @@ -41,6 +32,7 @@ jobs:
- 8.0
- 8.1
- 8.2
- 8.3

steps:
- name: Checkout.
Expand Down
31 changes: 13 additions & 18 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'psalm.xml'
paths:
- 'src/**'
- '.github/workflows/mutation.yml'
- 'composer.json'

push:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'psalm.xml'
branches: ['master']
paths:
- 'src/**'
- '.github/workflows/mutation.yml'
- 'composer.json'

name: mutation test

Expand All @@ -35,25 +30,25 @@ jobs:
- ubuntu-latest

php:
- 8.1
- 8.3

services:
mssql:
image: mcr.microsoft.com/mssql/server:2019-latest
image: mcr.microsoft.com/mssql/server:2022-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
options: --name=mssql --health-cmd="/opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -C -Q 'SELECT 1'" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- 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'
run: docker exec -i mssql /opt/mssql-tools18/bin/sqlcmd -S localhost -U SA -P 'YourStrong!Passw0rd' -C -Q 'CREATE DATABASE yiitest'

- name: Install PHP with extensions.
uses: shivammathur/setup-php@v2
Expand Down
25 changes: 6 additions & 19 deletions .github/workflows/rector.yml_
Original file line number Diff line number Diff line change
@@ -1,23 +1,10 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'

push:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'
paths:
- 'src/**'
- '.github/workflows/rector.yml'
- 'composer.json'
- 'rector.php'

name: rector

Expand All @@ -28,4 +15,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0']
['8.3']
27 changes: 11 additions & 16 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
paths:
- 'src/**'
- '.github/workflows/static.yml'
- 'psalm*.xml'
- 'composer.json'

push:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'phpunit.xml.dist'
branches: ['master']
paths:
- 'src/**'
- '.github/workflows/static.yml'
- 'psalm*.xml'
- 'composer.json'

name: static analysis

Expand Down
Loading