CI 提速:主链路覆盖率改为可选参数
This commit is contained in:
Vendored
+3
-1
@@ -7,6 +7,7 @@ pipeline {
|
|||||||
|
|
||||||
parameters {
|
parameters {
|
||||||
booleanParam(name: 'RUN_FULL_E2E', defaultValue: false, description: '是否在部署后额外执行全量 E2E(失败仅标记 UNSTABLE)')
|
booleanParam(name: 'RUN_FULL_E2E', defaultValue: false, description: '是否在部署后额外执行全量 E2E(失败仅标记 UNSTABLE)')
|
||||||
|
booleanParam(name: 'RUN_COVERAGE', defaultValue: false, description: '是否在主链路执行覆盖率测试(关闭可提速)')
|
||||||
}
|
}
|
||||||
|
|
||||||
environment {
|
environment {
|
||||||
@@ -86,8 +87,9 @@ pipeline {
|
|||||||
rm -rf playwright-report test-results
|
rm -rf playwright-report test-results
|
||||||
cid=$(docker create --ipc=host \
|
cid=$(docker create --ipc=host \
|
||||||
-e HOME=/tmp \
|
-e HOME=/tmp \
|
||||||
|
-e RUN_COVERAGE=${RUN_COVERAGE} \
|
||||||
${CI_DEPS_IMAGE} \
|
${CI_DEPS_IMAGE} \
|
||||||
sh -lc 'set -e; cd /workspace; npx prisma generate; npm run lint; npx tsc --noEmit; npm run test:coverage; npm run test:e2e:smoke')
|
sh -lc 'set -e; cd /workspace; npx prisma generate; npm run lint; npx tsc --noEmit; if [ "$RUN_COVERAGE" = "true" ]; then npm run test:coverage; else npm run test; fi; npm run test:e2e:smoke')
|
||||||
cleanup() {
|
cleanup() {
|
||||||
docker rm -f "$cid" >/dev/null 2>&1 || true
|
docker rm -f "$cid" >/dev/null 2>&1 || true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user