[ci] test shortcuts
This commit is contained in:
parent
91e1cf3abe
commit
551c7f628a
3 changed files with 17 additions and 15 deletions
6
.github/CONTRIBUTING.md
vendored
6
.github/CONTRIBUTING.md
vendored
|
@ -10,9 +10,9 @@ Testing:
|
|||
========
|
||||
Github Actions will be running three sets of automated tests, all of which you can run for yourself:
|
||||
|
||||
- `./vendor/bin/php-cs-fixer fix` - keeping a single style for the whole project
|
||||
- `./vendor/bin/phpunit --config tests/phpunit.xml` - unit testing
|
||||
- `./vendor/bin/phpstan analyse --memory-limit 1G -c tests/phpstan.neon` - type checking
|
||||
- `composer format` - keeping a single style for the whole project
|
||||
- `composer test` - unit testing
|
||||
- `composer stan` - type checking
|
||||
|
||||
The `main` branch is locked down so it can't accept pull requests that don't pass these
|
||||
|
||||
|
|
14
.github/workflows/tests.yml
vendored
14
.github/workflows/tests.yml
vendored
|
@ -31,7 +31,7 @@ jobs:
|
|||
with:
|
||||
php-version: 8.3
|
||||
- name: Format
|
||||
run: ./vendor/bin/php-cs-fixer fix && git diff --exit-code
|
||||
run: composer format && git diff --exit-code
|
||||
|
||||
static:
|
||||
name: Static Analysis
|
||||
|
@ -50,10 +50,7 @@ jobs:
|
|||
- name: Install PHP dependencies
|
||||
run: composer install --prefer-dist --no-progress
|
||||
- name: PHPStan
|
||||
uses: php-actions/phpstan@v3
|
||||
with:
|
||||
configuration: tests/phpstan.neon
|
||||
memory_limit: 1G
|
||||
run: composer stan
|
||||
|
||||
upgrade:
|
||||
name: Upgrade from 2.9 ${{ matrix.database }}
|
||||
|
@ -140,9 +137,4 @@ jobs:
|
|||
- name: Install PHP dependencies
|
||||
run: composer install --no-progress
|
||||
- name: Run test suite
|
||||
run: |
|
||||
if [[ "${{ matrix.php }}" == "8.3" ]]; then
|
||||
vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover=data/coverage.clover
|
||||
else
|
||||
vendor/bin/phpunit --configuration tests/phpunit.xml
|
||||
fi
|
||||
run: composer test
|
||||
|
|
|
@ -75,5 +75,15 @@
|
|||
"ext-zlib": "anti-spam",
|
||||
"ext-xml": "some extensions",
|
||||
"ext-gd": "GD-based thumbnailing"
|
||||
},
|
||||
"scripts": {
|
||||
"check": [
|
||||
"@format",
|
||||
"@stan",
|
||||
"@test"
|
||||
],
|
||||
"format": "php-cs-fixer fix",
|
||||
"stan": "phpstan analyse --memory-limit 1G -c tests/phpstan.neon",
|
||||
"test": "phpunit --config tests/phpunit.xml"
|
||||
}
|
||||
}
|
||||
|
|
Reference in a new issue