Skip to content

Fix README

Fix README #15

Workflow file for this run

name: ci
on:
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [ '7.4', '8.0', '8.1', '8.2', '8.3' ]
allow-failure: [ false ]
coverage: [ false ]
composer-flags: [ '' ]
include:
- php-version: '7.3'
coverage: true
- php-version: '8.4'
allow-failure: true
composer-flags: '--ignore-platform-req php'
steps:
- uses: actions/checkout@v4
- name: php-setup
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: composer-validate
run: composer validate
- name: composer-cache
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php-version }}-composer-
- name: composer-install
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest ${{ matrix.composer-flags }}
- name: phpstan
run: vendor/bin/phpstan --level=max --memory-limit="-1" --no-progress analyze
- name: php-cs-fixer
continue-on-error: ${{ matrix.allow-failure }}
env:
PHP_CS_FIXER_IGNORE_ENV: ${{ matrix.allow-failure }}
run: vendor/bin/php-cs-fixer fix --dry-run --diff --verbose --config=.php_cs.dist
- name: phpunit
run: vendor/bin/phpunit --coverage-text --coverage-clover=build/coverage.xml
- name: coverage
if: ${{ matrix.coverage }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./.coverage/coverage.xml