Skip to content

refactor: new exceptions, class constants #366

refactor: new exceptions, class constants

refactor: new exceptions, class constants #366

name: "Continuous Integration"
on:
workflow_dispatch:
push:
branches:
- "3.x-dev"
pull_request:
branches:
- "3.x-dev"
jobs:
phpstan:
name: "PHPStan Static Analysis ${{ matrix.php-version }}, ${{ matrix.operating-system }}"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php-version:
- "8.3"
- "8.4"
- "8.5"
operating-system:
- "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: "Install PHP ${{ matrix.php-version }}"
uses: shivammathur/setup-php@master
with:
php-version: "${{ matrix.php-version }}"
extensions: mbstring
- name: "Validate composer.json and composer.lock"
run: composer validate --strict
- name: "Setup Composer, install dependencies"
uses: ramsey/composer-install@v3
with:
composer-options: "--prefer-dist --optimize-autoloader"
require-lock-file: "true"
- name: "Run PHPStan"
run: composer run-script phpstan
unit-test:
name: "Run Unit Tests ${{ matrix.php-version }}, ${{ matrix.operating-system }}"
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php-version:
- "8.3"
- "8.4"
- "8.5"
operating-system:
- "ubuntu-latest"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 10
- name: "Install PHP ${{ matrix.php-version }}"
uses: shivammathur/setup-php@master
with:
php-version: "${{ matrix.php-version }}"
extensions: mbstring
coverage: xdebug
- name: "Validate composer.json and composer.lock"
run: composer validate --strict
- name: "Setup Composer, install dependencies"
uses: ramsey/composer-install@v3
with:
composer-options: "--prefer-dist --optimize-autoloader"
require-lock-file: "true"
- name: "Run test suite"
run: composer run-script phpunit
- name: "Coverage Check"
uses: ericsizemore/phpunit-coverage-check-action@1.1.1
with:
clover_file: 'build/logs/clover.xml'
threshold: 100
# - uses: sudo-bot/action-scrutinizer@latest
# with:
# cli-args: "--format=php-clover build/logs/clover.xml"