Skip to content

Remove third-party notice #14

Remove third-party notice

Remove third-party notice #14

Workflow file for this run

name: "CI"
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
workflow_dispatch:
permissions:
contents: read
env:
PHP_STABLE_VERSION: '8.4'
jobs:
cs:
name: "Code style"
runs-on: ubuntu-latest
steps:
- name: "Git: checkout"
uses: actions/checkout@v4
- name: "PHP: setup ${{ env.PHP_STABLE_VERSION }}"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_STABLE_VERSION }}
coverage: none
tools: php-cs-fixer
- name: "Composer: validate"
run: composer validate --strict
- name: "Composer: install"
run: composer install --prefer-dist --no-interaction --no-progress
- name: "Php-CS-Fixer: version"
run: php-cs-fixer -V
- name: "Php-CS-Fixer: check"
run: php-cs-fixer fix --diff --dry-run
sa:
name: "Static Analysis"
runs-on: ubuntu-latest
steps:
- name: "Git: checkout"
uses: actions/checkout@v4
- name: "PHP: setup ${{ env.PHP_STABLE_VERSION }}"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_STABLE_VERSION }}
coverage: pcov
tools: phpstan
- name: "Composer: install"
run: composer install --prefer-dist --no-interaction --no-progress
- name: "PHPStan: version"
run: phpstan --version
- name: "PHPStan: analyze"
run: phpstan analyze --memory-limit=-1
tests:
name: "Unit Tests (PHP ${{ matrix.php-version }})"
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['8.2', '8.3', '8.4', '8.5']
fail-fast: false
steps:
- name: "Git: checkout"
uses: actions/checkout@v4
- name: "PHP: setup ${{ matrix.php-version }}"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
tools: phpunit
# Force PHPUnit 11.5 on PHP 8.2 to keep support for it
# https://phpunit.de/supported-versions.html
- if: matrix.php-version == '8.2'
run: composer require --no-update phpunit/phpunit:^11.5
- name: "Composer: install"
run: composer update --no-interaction --prefer-dist
- name: "PHPUnit: version"
run: phpunit --version
- name: "PHPUnit: tests"
if: matrix.php-version != env.PHP_STABLE_VERSION
run: phpunit
- name: "PHPUnit: tests + coverage"
if: matrix.php-version == env.PHP_STABLE_VERSION
run: phpunit --coverage-clover ./coverage.xml
- name: "Codecov: upload coverage"
if: matrix.php-version == env.PHP_STABLE_VERSION
uses: codecov/codecov-action@v5
with:
files: ./coverage.xml
fail_ci_if_error: false