mirror of
https://github.com/nextcloud/passman.git
synced 2024-12-28 02:44:14 +08:00
Merge branch 'codeCoverage' into phpunit
This commit is contained in:
commit
a45dd19792
4 changed files with 44 additions and 4 deletions
21
.drone.yaml
Normal file
21
.drone.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
pipeline:
|
||||
clone:
|
||||
image: plugins/git
|
||||
depth: 1
|
||||
signed-off-check:
|
||||
image: nextcloudci/php7.0:php7.0-2
|
||||
environment:
|
||||
- APP_NAME=passman
|
||||
- CORE_BRANCH=master
|
||||
- DB=sqlite
|
||||
commands:
|
||||
- wget https://raw.githubusercontent.com/nextcloud/travis_ci/master/before_install.sh
|
||||
- bash ./before_install.sh $APP_NAME $CORE_BRANCH $DB
|
||||
- cd ../server
|
||||
- php ./build/signed-off-checker.php
|
||||
when:
|
||||
matrix:
|
||||
TESTS: signed-off-check
|
||||
matrix:
|
||||
include:
|
||||
- TESTS: signed-off-check
|
6
.scrutinizer.yml
Normal file
6
.scrutinizer.yml
Normal file
|
@ -0,0 +1,6 @@
|
|||
tools:
|
||||
external_code_coverage: true
|
||||
php_mess_detector: true
|
||||
php_code_sniffer: true
|
||||
sensiolabs_security_checker: true
|
||||
php_code_coverage: true
|
|
@ -63,11 +63,11 @@ script:
|
|||
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '2' ]; then ./occ app:check-code $APP_NAME -c deprecation; fi"
|
||||
- cd apps/$APP_NAME/
|
||||
|
||||
#- php build/phpunit.phar -c phpunit.xml
|
||||
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then php build/phpunit.phar -c phpunit.xml --coverage-clover=coverage.clover; fi"
|
||||
|
||||
# Create coverage report
|
||||
#- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
|
||||
#- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then php ocular.phar code-coverage:upload --format=php-clover clover.xml; fi"
|
||||
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then wget https://scrutinizer-ci.com/ocular.phar; fi"
|
||||
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi"
|
||||
#- cd ../
|
||||
- sh -c "if [ '$JSTESTS' = '1' ]; then grunt jshint; fi"
|
||||
|
||||
|
|
|
@ -10,4 +10,17 @@
|
|||
*/
|
||||
|
||||
require_once __DIR__ . '/../../../tests/bootstrap.php';
|
||||
require_once __DIR__ . '/../appinfo/autoload.php';
|
||||
require_once __DIR__ . '/../appinfo/autoload.php';
|
||||
|
||||
|
||||
|
||||
// Fix for "Autoload path not allowed: .../tests/lib/testcase.php"
|
||||
\OC::$loader->addValidRoot(OC::$SERVERROOT . '/tests');
|
||||
// Fix for "Autoload path not allowed: .../activity/tests/testcase.php"
|
||||
\OC_App::loadApp('activity');
|
||||
// Fix for "Autoload path not allowed: .../files/lib/activity.php"
|
||||
\OC_App::loadApp('files');
|
||||
// Fix for "Autoload path not allowed: .../files_sharing/lib/activity.php"
|
||||
\OC_App::loadApp('files_sharing');
|
||||
|
||||
OC_Hook::clear();
|
Loading…
Reference in a new issue