已开启
fix(ci): build.sh 变更分析失败时不再静默跳过测试 #136
lizhe创建于 24 天前
fix(ci): build.sh 变更分析失败时不再静默跳过测试 #136
已开启
共 1 个文件变更+4-1
| @@ -95,7 +95,10 @@ if [[ -z "$CHANGED_LIST" ]]; then | |||
| 95 | fi | 95 | fi |
| 96 | [[ -s "$CHANGED_LIST" ]] || { echo "[INFO] no changed files, skip tests"; exit 0; } | 96 | [[ -s "$CHANGED_LIST" ]] || { echo "[INFO] no changed files, skip tests"; exit 0; } |
| 97 | 97 | ||
| 98 | -ops=$("$PYTHON" "$REPO_ROOT/scripts/ci/parse_changed_ops.py" "$CHANGED_LIST") | 98 | +if ! ops=$("$PYTHON" "$REPO_ROOT/scripts/ci/parse_changed_ops.py" "$CHANGED_LIST"); then |
| 99 | + echo "[ERROR] changed-file analysis failed ($CHANGED_LIST); refusing to skip tests" >&2 | ||
| 100 | + exit 1 | ||
| 101 | +fi | ||
| 99 | echo "affected ops: [$ops]" | 102 | echo "affected ops: [$ops]" |
| 100 | if [[ -z "$ops" ]]; then | 103 | if [[ -z "$ops" ]]; then |
| 101 | echo "[INFO] no operator affected, skip tests" | 104 | echo "[INFO] no operator affected, skip tests" |