Add composer scrits for easier test execution

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
Christoph Wurst 2018-10-22 08:34:32 +02:00
Родитель f6a667ae1a
Коммит fa297a4424
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: CC42AC2A7F0E56D8
2 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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,