Skip to content

Upgrade brick/coding-standard to v4 #42

Upgrade brick/coding-standard to v4

Upgrade brick/coding-standard to v4 #42

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
env:
PHPSTAN_PHP_VERSION: "8.5"
COVERAGE_PHP_VERSION: "8.5"
jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHPSTAN_PHP_VERSION }}
- name: Install composer dependencies
uses: ramsey/composer-install@v3
- name: Run PHPStan
run: vendor/bin/phpstan --no-progress
coding-standard:
name: Coding Standard
uses: brick/coding-standard/.github/workflows/coding-standard.yml@v4
with:
working-directory: "tools/ecs"
phpunit:
name: PHPUnit
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
- "8.5"
deps:
- "highest"
include:
- php-version: "8.1"
deps: "lowest"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug
- name: Install composer dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: ${{ matrix.deps }}
- name: Run PHPUnit
run: vendor/bin/phpunit
if: ${{ matrix.php-version != env.COVERAGE_PHP_VERSION }}
- name: Run PHPUnit with coverage
run: vendor/bin/phpunit --coverage-clover clover.xml
if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
if: ${{ matrix.php-version == env.COVERAGE_PHP_VERSION }}