From 900d84b15e03a654be7b4aec22b2ee8a7304d650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=B5=B7?= Date: Wed, 4 Dec 2019 11:35:42 +0800 Subject: [PATCH] Add Test coverage --- .gitlab-ci.yml | 2 +- pom.xml | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e6b452..9137476 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -13,7 +13,7 @@ test: stage: test script: - cp "$APP_TEST" ./src/main/resources/application-test.properties - - mvn test + - mvn clean test && cat target/site/jacoco/index.html deploy: stage: deploy diff --git a/pom.xml b/pom.xml index 40e8772..3cfdb6d 100644 --- a/pom.xml +++ b/pom.xml @@ -156,6 +156,26 @@ org.springframework.boot spring-boot-maven-plugin + + org.jacoco + jacoco-maven-plugin + 0.7.9 + + + pre-unit-test + + prepare-agent + + + + post-unit-test + test + + report + + + +