Add composer scrits for easier test execution
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Родитель
f6a667ae1a
Коммит
fa297a4424
|
@ -98,8 +98,7 @@ script:
|
||||||
- sh -c "if [ '$TEST_JS' = 'TRUE' ]; then cat ./coverage/*/lcov.info | coveralls; fi"
|
- sh -c "if [ '$TEST_JS' = 'TRUE' ]; then cat ./coverage/*/lcov.info | coveralls; fi"
|
||||||
|
|
||||||
# Run PHP tests
|
# Run PHP tests
|
||||||
- cd tests
|
- composer run test
|
||||||
- ../vendor/phpunit/phpunit/phpunit --configuration phpunit.xml
|
|
||||||
|
|
||||||
# Publish PHP coverage to scrutinizer
|
# Publish PHP coverage to scrutinizer
|
||||||
- if [[ "$PHP_COVERAGE" = "TRUE" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
|
- if [[ "$PHP_COVERAGE" = "TRUE" ]]; then wget https://scrutinizer-ci.com/ocular.phar; fi
|
||||||
|
|
|
@ -17,6 +17,13 @@
|
||||||
"christophwurst/nextcloud": "dev-master",
|
"christophwurst/nextcloud": "dev-master",
|
||||||
"phpunit/phpunit": "^6.5.5"
|
"phpunit/phpunit": "^6.5.5"
|
||||||
},
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "phpunit -c tests/phpunit.xml",
|
||||||
|
"test:acceptance": "phpunit -c tests/phpunit.xml tests/Acceptance",
|
||||||
|
"test:unit": "phpunit -c tests/phpunit.xml tests/Unit",
|
||||||
|
"test:acceptance:dev": "phpunit -c tests/phpunit.xml tests/Acceptance --no-coverage",
|
||||||
|
"test:unit:dev": "phpunit -c tests/phpunit.xml tests/Unit --no-coverage"
|
||||||
|
},
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
"classmap-authoritative": true,
|
"classmap-authoritative": true,
|
||||||
|
|
Загрузка…
Ссылка в новой задаче