Skip to content

Replace StyleCI with PHP CS Fixer #126

Replace StyleCI with PHP CS Fixer

Replace StyleCI with PHP CS Fixer #126

Workflow file for this run

on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'
push:
branches: ['master']
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: ubuntu-latest
strategy:
max-parallel: 3
matrix:
php:
- 8.5
mariadb:
- 10.4
- 10.5
- 10.6
- 10.7
- 10.8
- 10.9
- 10
- 11.0
- 11
- 12.0
- 12
- latest
include:
- php: 8.1
mariadb: latest
- php: 8.2
mariadb: latest
- php: 8.3
mariadb: latest
- php: 8.4
mariadb: latest
services:
mysql:
image: mariadb:${{ 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
- name: Update composer.
run: composer self-update
- uses: "ramsey/composer-install@v3"
with:
composer-options: "--prefer-dist --no-interaction --no-progress --ansi"
- 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.5'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml