Add composer scripts for php tests

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl
2021-04-12 08:08:36 +02:00
parent a6c4912bff
commit 73fce1d4ee

View File

@@ -1,34 +1,40 @@
{ {
"name": "nextcloud/deck", "name": "nextcloud/deck",
"type": "project", "type": "project",
"license": "AGPLv3", "license": "AGPLv3",
"authors": [ "authors": [
{ {
"name": "Julius Härtl", "name": "Julius Härtl",
"email": "jus@bitgrid.net" "email": "jus@bitgrid.net"
} }
], ],
"require": { "require": {
"cogpowered/finediff": "0.3.*" "cogpowered/finediff": "0.3.*"
}, },
"require-dev": { "require-dev": {
"roave/security-advisories": "dev-master", "roave/security-advisories": "dev-master",
"christophwurst/nextcloud": "^21@dev", "christophwurst/nextcloud": "^21@dev",
"phpunit/phpunit": "^8", "phpunit/phpunit": "^8",
"nextcloud/coding-standard": "^0.5.0", "nextcloud/coding-standard": "^0.5.0",
"symfony/event-dispatcher": "^4.0", "symfony/event-dispatcher": "^4.0",
"vimeo/psalm": "^4.3", "vimeo/psalm": "^4.3",
"php-parallel-lint/php-parallel-lint": "^1.2" "php-parallel-lint/php-parallel-lint": "^1.2"
}, },
"config": { "config": {
"optimize-autoloader": true, "optimize-autoloader": true,
"classmap-authoritative": true "classmap-authoritative": true
}, },
"scripts": { "scripts": {
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l", "lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
"cs:check": "php-cs-fixer fix --dry-run --diff", "cs:check": "php-cs-fixer fix --dry-run --diff",
"cs:fix": "php-cs-fixer fix", "cs:fix": "php-cs-fixer fix",
"psalm": "psalm", "psalm": "psalm",
"psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType" "psalm:fix": "psalm --alter --issues=InvalidReturnType,InvalidNullableReturnType,MismatchingDocblockParamType,MismatchingDocblockReturnType,MissingParamType,InvalidFalsableReturnType",
} "test": [
"@test:unit",
"@test:integration"
],
"test:unit": "phpunit -c tests/phpunit.xml",
"test:integration": "phpunit -c tests/phpunit.integration.xml && cd tests/integration && ./run.sh"
}
} }