From b6389186976b6419370f7bf4269b0cd7d23f8bcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=98=95?= Date: Tue, 12 Mar 2024 11:05:49 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E6=9B=B4=E6=96=B0=E6=B5=81=E6=B0=B4?= =?UTF-8?q?=E7=BA=BF=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d578215..690098d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,7 @@ stages : - sonarqube-check - compile + - integration-test - package # 代码质量检查 @@ -17,7 +18,7 @@ sonarqube-check: paths: - .sonar/cache script: - - mvn verify sonar:sonar -DskipTests + - mvn verify sonar:sonar allow_failure: true only: - merge_requests @@ -36,6 +37,25 @@ compile : - echo "=============== 开始编译任务 ===============" - mvn clean compile -DskipTests +# 集成测试 +integration-test: + stage : integration-test + tags : + - linux-maven + only : + - master + script : + - echo "=============== 开始集成测试 ===============" + - mvn test + artifacts: + when : always + reports: + junit: + - target/surefire-reports/TEST-*.xml + - target/failsafe-reports/TEST-*.xml + dependencies: + - compile + # 打包 package : stage : package @@ -45,4 +65,4 @@ package : - master script: - echo "=============== 开始打包任务 ===============" - - mvn clean package -DskipTests \ No newline at end of file + - mvn clean package \ No newline at end of file