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
71 changes: 0 additions & 71 deletions .github/workflows/ci.yml

This file was deleted.

67 changes: 67 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Lint

on:
push:
branches: [ main ]
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: 8.3

- uses: ramsey/composer-install@v4

- name: PHP CS Fixer
run: ./vendor/bin/php-cs-fixer check

rector:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6

- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: 8.3

- uses: ramsey/composer-install@v4
with:
working-directory: "tools/rector"

- name: Rector
run: ./tools/bin/rector --dry-run

others:
name: Others Quality Checks
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3

- name: Download dependencies
uses: ramsey/composer-install@v4

- name: Lint Composer config
shell: bash
run: composer validate

- name: Check that PSR is respected
shell: bash
run: composer dump-autoload --dev -o --dry-run --strict-psr

- name: Check whether a PHP dependency is compromised
shell: bash
run: composer audit
70 changes: 70 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Tests

on:
push:
branches: [ main ]
pull_request:

jobs:
test:
name: "Tests (PHP ${{ matrix.php }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 8.3
symfony-version: 7.2.*
composer-flags: '--prefer-stable --ignore-platform-req=php+'
stability: stable
- php: 8.3
symfony-version: 7.3.*
composer-flags: '--prefer-stable'
- php: 8.3
symfony-version: 7.4.*
composer-flags: '--prefer-stable'
- php: 8.4
symfony-version: 7.2.*
composer-flags: '--prefer-stable'
- php: 8.4
symfony-version: 7.3.*
composer-flags: '--prefer-stable'
- php: 8.4
symfony-version: 7.4.*
composer-flags: '--prefer-stable'
- php: 8.4
symfony-version: 8.0.*
composer-flags: '--prefer-stable'
- php: 8.5
symfony-version: 7.3.*
composer-flags: '--prefer-stable'
- php: 8.5
symfony-version: 7.4.*
composer-flags: '--prefer-stable'
- php: 8.5
symfony-version: 8.0.*
composer-flags: '--prefer-stable'
steps:
- name: "Checkout"
uses: actions/checkout@v6

- name: "Install PHP with extensions"
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Install dependencies
env:
SYMFONY_REQUIRE: ${{ matrix.symfony-version }}
run: composer update ${{ matrix.composer-flags }} --no-interaction --no-progress --optimize-autoloader

- name: Install PDFtk
run: sudo apt install -y pdftk

- name: Run tests and collect coverage
run: vendor/bin/phpunit --coverage-clover coverage.xml

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v6
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
],
"require": {
"php": "^8.3",
"symfony/process": "^7.2"
"symfony/process": "^7.2 || ^8.0"
},
"require-dev": {
"phpunit/phpunit": "^12",
Expand All @@ -31,6 +31,7 @@
"phpstan/phpstan-phpunit": "^2.0"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"phpstan/extension-installer": true
}
Expand Down