diff --git a/.drone.yaml b/.drone.yaml new file mode 100644 index 00000000..4f29936b --- /dev/null +++ b/.drone.yaml @@ -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 diff --git a/.scrutinizer.yml b/.scrutinizer.yml new file mode 100644 index 00000000..a0b592f6 --- /dev/null +++ b/.scrutinizer.yml @@ -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 \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index a0506795..573b27fa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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" diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 995df9a2..f6c58443 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -10,4 +10,17 @@ */ require_once __DIR__ . '/../../../tests/bootstrap.php'; -require_once __DIR__ . '/../appinfo/autoload.php'; \ No newline at end of file +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(); \ No newline at end of file