summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBénédikt Tran <10796600+picnixz@users.noreply.github.com>2025-01-14 08:40:59 (GMT)
committerGitHub <noreply@github.com>2025-01-14 08:40:59 (GMT)
commit99327d124145d22cde8ff324754026c87f01a1f7 (patch)
tree069b7c1437483e8259decc069ac1ed9d6df17d13
parent06cad77a5b345adde88609be9c3c470c5cd9f417 (diff)
downloadcpython-99327d124145d22cde8ff324754026c87f01a1f7.zip
cpython-99327d124145d22cde8ff324754026c87f01a1f7.tar.gz
cpython-99327d124145d22cde8ff324754026c87f01a1f7.tar.bz2
Skip CI expensive checks on `CODEOWNERS` update (#128754)
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
-rw-r--r--.github/workflows/reusable-change-detection.yml17
1 files changed, 16 insertions, 1 deletions
diff --git a/.github/workflows/reusable-change-detection.yml b/.github/workflows/reusable-change-detection.yml
index 964bd87..c08c0cb 100644
--- a/.github/workflows/reusable-change-detection.yml
+++ b/.github/workflows/reusable-change-detection.yml
@@ -83,7 +83,22 @@ jobs:
# into the PR branch anyway.
#
# https://github.com/python/core-workflow/issues/373
- git diff --name-only "origin/$GITHUB_BASE_REF.." | grep -qvE '(\.rst$|^Doc|^Misc|^\.pre-commit-config\.yaml$|\.ruff\.toml$|\.md$|mypy\.ini$)' && echo "run-tests=true" >> "$GITHUB_OUTPUT" || true
+ grep_ignore_args=(
+ # file extensions
+ -e '\.md$'
+ -e '\.rst$'
+ # top-level folders
+ -e '^Doc/'
+ -e '^Misc/'
+ # configuration files
+ -e '^\.github/CODEOWNERS$'
+ -e '^\.pre-commit-config\.yaml$'
+ -e '\.ruff\.toml$'
+ -e 'mypy\.ini$'
+ )
+ git diff --name-only "origin/$GITHUB_BASE_REF.." \
+ | grep -qvE "${grep_ignore_args[@]}" \
+ && echo "run-tests=true" >> "$GITHUB_OUTPUT" || true
fi
# Check if we should run hypothesis tests