Skip to content

Commit

Permalink
Add concurrency, add mariadb actions.
Browse files Browse the repository at this point in the history
  • Loading branch information
terabytesoftw committed Jan 30, 2024
1 parent 2220f80 commit cd29961
Show file tree
Hide file tree
Showing 11 changed files with 135 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/bc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:

name: backwards compatibility

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

jobs:
roave_bc_check:
uses: yiisoft/actions/.github/workflows/bc.yml@master
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ 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
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/mariadb.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
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'

name: mariadb

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

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

env:
extensions: pdo, pdo_mysql

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

strategy:
matrix:
os:
- ubuntu-latest

php:
- 8.0
- 8.1
- 8.2
- 8.3

mariadb:
- mariadb:10.4
- mariadb:10.5
- mariadb:10.6
- mariadb:10.7
- mariadb:10.8
- mariadb:10.9
- 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@v3

- 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
tools: composer:v2

- name: Update composer.
run: composer self-update

- name: Install db-mysql.
run: composer require yiisoft/db-mysql --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

- name: Run tests with phpunit.
run: vendor/bin/phpunit --testsuite=Mysql --coverage-clover=coverage.xml --colors=always

- name: Upload coverage to Codecov.
if: matrix.php == '8.1'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
4 changes: 4 additions & 0 deletions .github/workflows/mssql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:

name: mssql

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

jobs:
tests:
name: PHP ${{ matrix.php }}-mssql-${{ matrix.mssql }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:

name: mutation

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

jobs:
mutation:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:

name: mysql

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

jobs:
tests:
name: PHP ${{ matrix.php }}-mysql-${{ matrix.mysql }}
Expand All @@ -44,13 +48,6 @@ jobs:
mysql:
- mysql:5.7
- mysql:latest
- mariadb:10.4
- mariadb:10.5
- mariadb:10.6
- mariadb:10.7
- mariadb:10.8
- mariadb:10.9
- mariadb:latest

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

name: oracle

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

jobs:
tests:
name: PHP ${{ matrix.php }}-oracle-${{ matrix.oracle }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pgsql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:

name: pgsql

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

jobs:
tests:
name: PHP ${{ matrix.php }}-pgsql-${{ matrix.pgsql }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:

name: rector

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

jobs:
rector:
uses: yiisoft/actions/.github/workflows/rector.yml@master
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/sqlite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ on:

name: sqlite

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

jobs:
tests:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
Expand Down
4 changes: 4 additions & 0 deletions .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:
psalm:
uses: yiisoft/actions/.github/workflows/psalm.yml@master
Expand Down

0 comments on commit cd29961

Please sign in to comment.