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