Skip to content
Open
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
16 changes: 5 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@ name: "CI"

on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
workflow_dispatch:

permissions:
Expand All @@ -17,7 +13,6 @@ concurrency:
cancel-in-progress: true

jobs:
# composer validation
composer:
name: "composer config validation"
runs-on: "ubuntu-latest"
Expand All @@ -30,9 +25,8 @@ jobs:
- name: "Validate composer.json"
run: "composer validate --strict"

# PHP lint, PHPUnit, PHPStan and PHPCS for different PHP versions
php:
name: "PHP ${{ matrix.php-version }} (${{ matrix.dependencies }}) - PHPUnit, PHPStan, PHPCS"
name: "PHP ${{ matrix.php-version }} (${{ matrix.dependencies }})"
needs: "composer"
runs-on: "ubuntu-latest"
timeout-minutes: 15
Expand Down Expand Up @@ -60,20 +54,20 @@ jobs:
extensions: "json"
coverage: "xdebug"
tools: "composer:v2"
cache: "composer"
- name: "install composer dependencies (locked)"
if: "matrix.dependencies == 'locked'"
run: "composer install --prefer-dist --no-interaction --no-progress"
- name: "install composer dependencies (lowest)"
if: "matrix.dependencies == 'lowest'"
run: "composer update --prefer-lowest --prefer-dist --no-interaction --no-progress"
- name: "audit dependencies for known security vulnerabilities"
if: "matrix.php-version == '8.1'"
run: "composer audit"
- name: "lint PHP files"
run: "find exceptions/ src/ tests/ -type f -name '*.php' -print0 | xargs -0 -n1 php -l"
- name: "run PHPUnit"
run: "php vendor/bin/phpunit --coverage-text"
run: "php vendor/bin/phpunit --coverage-text --colors=never"
- name: "run PHPStan"
run: "vendor/bin/phpstan analyse --no-progress"
run: "php vendor/bin/phpstan analyse --no-progress"
- name: "run PHPCS"
run: "vendor/bin/phpcs"
run: "php vendor/bin/phpcs"
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}
},
"require-dev": {
"phpunit/phpunit": "^9.0",
"phpunit/phpunit": "^9.6.33",
"phpstan/phpstan": "^2.0",
"squizlabs/php_codesniffer": "^4.0"
}
Expand Down