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
6 changes: 5 additions & 1 deletion .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,18 @@ jobs:
unit-tests:
name: "Unit tests"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1']

steps:
- name: "Checkout repository"
uses: "actions/checkout@v2"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: 7.4"
php-version: ${{ matrix.php-versions }}
ini-values: "memory_limit=-1"

- name: "Install dependencies (Composer)"
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
/.phpunit.result.cache
/.php_cs.cache
/build
composer.lock
18 changes: 14 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
"sort-packages": true,
"platform": {
"php": "7.4"
},
"allow-plugins": {
"phpstan/extension-installer": true
}
},
"require": {
Expand All @@ -36,7 +39,9 @@
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.18",
"phpstan/phpstan": "^0.12.77",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5"
},
"autoload-dev": {
Expand All @@ -45,12 +50,17 @@
}
},
"scripts": {
"style-lint": "php-cs-fixer fix --dry-run --verbose --show-progress=none",
"style-fix": "php-cs-fixer fix",
"stan": "phpstan analyse --level=5 src tests",
"style-lint": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --dry-run --verbose --show-progress=none",
"style-fix": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix",
"stan": "phpstan analyse --level=7 src tests",
"test": "phpunit --bootstrap=vendor/autoload.php --no-coverage tests",
"test-coverage": "XDEBUG_MODE=coverage phpunit --bootstrap=vendor/autoload.php --coverage-html=build/coverage --whitelist=src tests",
"test-debug": "XDEBUG_MODE=debug phpunit --bootstrap=vendor/autoload.php --no-coverage --debug tests",
"fix": [
"@style-fix",
"@stan",
"@test-coverage"
],
"test-all": [
"@style-lint",
"@stan",
Expand Down
Loading