diff options
author | brantje <brantje@gmail.com> | 2017-01-04 00:03:28 +0300 |
---|---|---|
committer | brantje <brantje@gmail.com> | 2017-01-04 01:56:53 +0300 |
commit | b03fc53787f0b8f4f2e63c29e4f52d4edffd9b88 (patch) | |
tree | 76cee27178077e0167aac0dedb866bac8a00d144 /.travis.yml | |
parent | a8d1299785bf5d9db3ebce086daf5b14f43a0531 (diff) |
Add coverage to codacy
Diffstat (limited to '.travis.yml')
-rw-r--r-- | .travis.yml | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml index aa970fcf..7d45ac23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,6 +48,8 @@ before_script: - cd apps/$APP_NAME/ - mkdir -p build - 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" # - ./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" - 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 - - 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" - #- cd ../ + + - sh -c "if [ '$JSTESTS' = '1' ]; then grunt jshint; fi" - sh -c "if [ '$JSTESTS' = '1' ]; then grunt karma; fi" |