Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 10 additions & 32 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:
permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
cs:
name: "Code style"
Expand All @@ -18,22 +22,18 @@ jobs:
- name: "Git: checkout"
uses: actions/checkout@v4

- name: "PHP: setup 8.3"
- name: "PHP: setup 8.2"
uses: shivammathur/setup-php@v2
with:
php-version: '8.3'
php-version: '8.2'
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: vendor/bin/php-cs-fixer -V

- name: "Php-CS-Fixer: check"
run: vendor/bin/php-cs-fixer fix --diff --dry-run

Expand All @@ -48,16 +48,13 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
tools: phpstan
coverage: none

- name: "Composer: install"
run: composer install --prefer-dist --no-interaction --no-progress

- name: "PHPStan: version"
run: phpstan --version

- name: "PHPStan: analyze"
run: phpstan
run: vendor/bin/phpstan

unit-tests:
name: "Unit Tests (PHP ${{ matrix.php-version }})"
Expand All @@ -74,14 +71,7 @@ jobs:
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
- name: "PHPUnit: install 11.5"
if: matrix.php-version == '8.2'
run: composer require --no-update phpunit/phpunit:^11.5
coverage: none

- name: "Composer: install (${{ matrix.dependencies }})"
run: |
Expand All @@ -91,11 +81,8 @@ jobs:
composer install --prefer-dist --no-interaction --no-progress
fi

- name: "PHPUnit: version"
run: phpunit --version

- name: "PHPUnit: tests"
run: phpunit --testsuite=unit
run: vendor/bin/phpunit --no-coverage --testsuite=unit

integration-tests:
name: "Integration Tests (PHP ${{ matrix.php-version }} ${{ matrix.dependencies }})"
Expand All @@ -121,12 +108,6 @@ jobs:
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: "Node: setup"
uses: actions/setup-node@v4
Expand All @@ -144,9 +125,6 @@ jobs:
- name: "Playwright: install browsers"
run: php bin/playwright-install --browsers

- name: "PHPUnit: version"
run: vendor/bin/phpunit --version

- name: "PHPUnit: all tests with coverage"
run: vendor/bin/phpunit --coverage-clover=coverage.xml

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"friendsofphp/php-cs-fixer": "^3.40",
"monolog/monolog": "^3.9",
"phpstan/phpstan": "^2.1",
"phpunit/phpunit": "^12.3",
"phpunit/phpunit": "^11.5",
"symfony/var-dumper": "^6.4 || ^7.3 || ^8.0"
},
"minimum-stability": "stable",
Expand Down