From 7f177aef3c2e396f9316e734d9635a6da17ec3a0 Mon Sep 17 00:00:00 2001 From: xiaoxia Date: Sun, 19 Jul 2026 18:56:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(ci):=20=E4=BF=AE=E5=A4=8Ddiff-cover?= =?UTF-8?q?=E4=B8=A2=E5=A4=B1coverage.xml=20-=20=E5=A4=87=E4=BB=BD?= =?UTF-8?q?=E6=97=B6=E5=8C=85=E5=90=ABcoverage.xml?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/ci/run_unit_tests.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ci/run_unit_tests.sh b/scripts/ci/run_unit_tests.sh index 9a94d51c0..1da6aa34b 100755 --- a/scripts/ci/run_unit_tests.sh +++ b/scripts/ci/run_unit_tests.sh @@ -76,7 +76,8 @@ if [ "${GITHUB_EVENT_NAME:-}" = "pull_request" ] && [ -n "${GITHUB_TOKEN:-}" ]; PR_CODE_DIR="/tmp/pr-code-$$" mkdir -p "$PR_CODE_DIR" - find . -maxdepth 1 -mindepth 1 ! -name 'coverage.xml' ! -name 'diff_coverage.html' -exec cp -r {} "$PR_CODE_DIR/" \; + # 备份PR代码(含coverage.xml,diff-cover需要用到 + find . -maxdepth 1 -mindepth 1 ! -name 'diff_coverage.html' -exec cp -r {} "$PR_CODE_DIR/" \; rm -rf .git git init > /dev/null 2>&1 git remote add origin https://git.xiaoxiajianji.com/xiaoxia/xiaoxia-saas.git > /dev/null 2>&1