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