mirror of
https://github.com/nextcloud/passman.git
synced 2024-12-26 09:34:02 +08:00
Add coverage to codacy
This commit is contained in:
parent
a8d1299785
commit
b03fc53787
1 changed files with 7 additions and 3 deletions
10
.travis.yml
10
.travis.yml
|
@ -48,6 +48,8 @@ before_script:
|
||||||
- cd apps/$APP_NAME/
|
- cd apps/$APP_NAME/
|
||||||
- mkdir -p build
|
- mkdir -p build
|
||||||
- curl -sSL https://phar.phpunit.de/phpunit.phar -o build/phpunit.phar
|
- curl -sSL https://phar.phpunit.de/phpunit.phar -o build/phpunit.phar
|
||||||
|
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then composer require codacy/coverage; 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' ]; then npm install; fi"
|
- sh -c "if [ '$JSTESTS' = '1' ]; then npm install; fi"
|
||||||
# - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
|
# - ./occ maintenance:install --database-name oc_autotest --database-user oc_autotest --admin-user admin --admin-pass admin --database $DB --database-pass=''
|
||||||
|
|
||||||
|
@ -60,12 +62,14 @@ script:
|
||||||
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '2' ]; then ./occ app:check-code $APP_NAME -c deprecation; fi"
|
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' = '2' ]; then ./occ app:check-code $APP_NAME -c deprecation; fi"
|
||||||
- cd apps/$APP_NAME/
|
- cd apps/$APP_NAME/
|
||||||
|
|
||||||
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then php build/phpunit.phar -v -c phpunit.xml --coverage-clover=coverage.clover; fi"
|
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then php build/phpunit.phar -v -c phpunit.xml --coverage-clover=coverage.clover --coverage-php=phpunit; fi"
|
||||||
|
|
||||||
|
|
||||||
# Create coverage report
|
# 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 vendor/bin/codacycoverage -v clover coverage.clover; fi"
|
||||||
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then php ocular.phar code-coverage:upload --access-token="$SCRUTINIZER_TOKEN" --format=php-clover coverage.clover; fi"
|
- sh -c "if [ '$JSTESTS' != '1' -a '$CODECHECK' != '1' -a '$CODECHECK' != '2' ]; then php ocular.phar code-coverage:upload --access-token="$SCRUTINIZER_TOKEN" --format=php-clover coverage.clover; fi"
|
||||||
#- cd ../
|
|
||||||
|
|
||||||
- sh -c "if [ '$JSTESTS' = '1' ]; then grunt jshint; fi"
|
- sh -c "if [ '$JSTESTS' = '1' ]; then grunt jshint; fi"
|
||||||
- sh -c "if [ '$JSTESTS' = '1' ]; then grunt karma; fi"
|
- sh -c "if [ '$JSTESTS' = '1' ]; then grunt karma; fi"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue