diff --git a/includes/tests/unit.yml b/includes/tests/unit.yml index 04124faebe48d00301c5608827b13f51b891981c..72f80a1d6c9c153d835a53ab7e7b6718ad77448a 100644 --- a/includes/tests/unit.yml +++ b/includes/tests/unit.yml @@ -11,6 +11,7 @@ - tmp_artifacts/unit reports: junit: tmp_artifacts/unit/report.xml + cobertura: coverage.cobertura.xml interruptible: true .template: &job-test-unit-template @@ -23,7 +24,7 @@ - cat /tmp/woocommerce/woocommerce.php - echo "xdebug.mode=coverage" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini script: - - vendor/bin/phpunit -d memory_limit=-1 --configuration phpunit-unit.xml --coverage-text --colors=never --log-junit tmp_artifacts/unit/report.xml --coverage-html tmp_artifacts/unit/coverage + - vendor/bin/phpunit -d memory_limit=-1 --configuration phpunit-unit.xml --coverage-text --colors=never --log-junit tmp_artifacts/unit/report.xml --coverage-html tmp_artifacts/unit/coverage --coverage-cobertura=coverage.cobertura.xml after_script: - 'if [[ ${REPORTPORTAL_AUTHORIZATION} && ${REPORTPORTAL_PROJECT} ]]; then curl -X POST "http://195.201.225.204:8080/api/v1/${REPORTPORTAL_PROJECT}/launch/import" -H "accept: */*" -H "Content-Type: multipart/form-data" -H "${REPORTPORTAL_AUTHORIZATION}" -F "file=file=@tmp_artifacts/unit/report.xml;type=text/xml;type=text/xml;filename=${CI_PROJECT_NAME}-${CI_COMMIT_REF_SLUG}-unit.xml"; fi' @@ -51,10 +52,6 @@ unit test lastest: unit test lastest coverage: <<: *job-test-unit-template image: wpdesknet/phpunit-woocommerce:0-0 - only: - refs: - - master - - main unit test lastest manual: <<: *job-test-unit-template-fast