Skip to content

Commit

Permalink
Add composer scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Jan 10, 2025
1 parent 3746709 commit 5eb277b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ jobs:
composer update --ansi
- name: Run PHP-CS-Fixer
run: vendor/bin/php-cs-fixer check --ansi --verbose --diff
run: composer cs:check
env:
PHP_CS_FIXER_IGNORE_ENV: ${{ matrix.php-version == '8.4' && '1' || '0' }}

- name: Run PHPStan Static Analysis Check
run: vendor/bin/phpstan analyse --ansi --verbose
run: composer phpstan:check
env:
XDEBUG_MODE: 'off'

- name: Run Nexus CS Config TestSuite
run: vendor/bin/phpunit --colors=always
run: composer test:unit
env:
TACHYCARDIA_MONITOR_GA: enabled

Expand Down
20 changes: 20 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,25 @@
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"scripts": {
"cs:check": "php-cs-fixer check --ansi --verbose --diff",
"cs:fix": "php-cs-fixer fix --ansi --verbose --diff",
"phpstan:baseline": "phpstan analyse --ansi --verbose --generate-baseline=phpstan-baseline.php",
"phpstan:check": "phpstan analyse --ansi --verbose",
"test:all": [
"@cs:check",
"@phpstan:check",
"@test:unit"
],
"test:unit": "phpunit --colors=always"
},
"scripts-descriptions": {
"cs:check": "Checks for coding style violations",
"cs:fix": "Fixes any coding style violations",
"phpstan:baseline": "Runs PHPStan and dumps resulting errors to baseline",
"phpstan:check": "Runs PHPStan with identifiers support",
"test:all": "Runs all tests",
"test:unit": "Runs all PHPUnit tests"
}
}

0 comments on commit 5eb277b

Please sign in to comment.