From 3dd301a3cb8b1cbca066a2a220b3b80165747b7b Mon Sep 17 00:00:00 2001 From: Jens Caers Date: Thu, 3 Sep 2026 00:28:43 +0000 Subject: [PATCH] ci: add lightweight validation fast path --- .gitea/workflows/managed-validation.yml | 27 +++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.gitea/workflows/managed-validation.yml b/.gitea/workflows/managed-validation.yml index b8d7385..3ec5149 100644 --- a/.gitea/workflows/managed-validation.yml +++ b/.gitea/workflows/managed-validation.yml @@ -45,6 +45,33 @@ jobs: exit 1 fi + # MANAGED_FAST_PATH: documentation and this baseline workflow cannot + # affect the shipped runtime. Keep the required status check, but do + # not install toolchains or execute the full product suite. + if [[ -n "${GITHUB_BASE_REF:-}" ]]; then + git fetch --no-tags --depth=1 origin "${GITHUB_BASE_REF}" + managed_base="origin/${GITHUB_BASE_REF}" + git diff --check "${managed_base}..HEAD" + mapfile -t managed_changed_files < <( + git diff --name-only --diff-filter=ACMR "${managed_base}..HEAD" + ) + managed_runtime_change=0 + for managed_path in "${managed_changed_files[@]}"; do + case "${managed_path}" in + *.md|*.mdx|docs/*|.github/ISSUE_TEMPLATE/*|.gitea/ISSUE_TEMPLATE/*|.gitea/runner-scope.sh|.gitea/workflows/managed-validation.yml) + ;; + *) + managed_runtime_change=1 + break + ;; + esac + done + if [[ "${#managed_changed_files[@]}" -gt 0 && "${managed_runtime_change}" -eq 0 ]]; then + printf 'Managed validation fast path: %s non-runtime file(s); full product suite skipped.\n' \ + "${#managed_changed_files[@]}" + exit 0 + fi + fi if [[ -f pyproject.toml || -f requirements.txt ]]; then # Compile only tracked Python sources. Running compileall after a # Node install would otherwise traverse node_modules and turn a