[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:
|
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
|
- `composer format` - keeping a single style for the whole project
|
||||||
- `./vendor/bin/phpunit --config tests/phpunit.xml` - unit testing
|
- `composer test` - unit testing
|
||||||
- `./vendor/bin/phpstan analyse --memory-limit 1G -c tests/phpstan.neon` - type checking
|
- `composer stan` - type checking
|
||||||
|
|
||||||
The `main` branch is locked down so it can't accept pull requests that don't pass these
|
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:
|
with:
|
||||||
php-version: 8.3
|
php-version: 8.3
|
||||||
- name: Format
|
- name: Format
|
||||||
run: ./vendor/bin/php-cs-fixer fix && git diff --exit-code
|
run: composer format && git diff --exit-code
|
||||||
|
|
||||||
static:
|
static:
|
||||||
name: Static Analysis
|
name: Static Analysis
|
||||||
|
@ -50,10 +50,7 @@ jobs:
|
||||||
- name: Install PHP dependencies
|
- name: Install PHP dependencies
|
||||||
run: composer install --prefer-dist --no-progress
|
run: composer install --prefer-dist --no-progress
|
||||||
- name: PHPStan
|
- name: PHPStan
|
||||||
uses: php-actions/phpstan@v3
|
run: composer stan
|
||||||
with:
|
|
||||||
configuration: tests/phpstan.neon
|
|
||||||
memory_limit: 1G
|
|
||||||
|
|
||||||
upgrade:
|
upgrade:
|
||||||
name: Upgrade from 2.9 ${{ matrix.database }}
|
name: Upgrade from 2.9 ${{ matrix.database }}
|
||||||
|
@ -140,9 +137,4 @@ jobs:
|
||||||
- name: Install PHP dependencies
|
- name: Install PHP dependencies
|
||||||
run: composer install --no-progress
|
run: composer install --no-progress
|
||||||
- name: Run test suite
|
- name: Run test suite
|
||||||
run: |
|
run: composer test
|
||||||
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
|
|
||||||
|
|
|
@ -75,5 +75,15 @@
|
||||||
"ext-zlib": "anti-spam",
|
"ext-zlib": "anti-spam",
|
||||||
"ext-xml": "some extensions",
|
"ext-xml": "some extensions",
|
||||||
"ext-gd": "GD-based thumbnailing"
|
"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