Skip to content

[Testing] Provide a CI check for disallowed code changes #3579

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
May 31, 2025
26 changes: 26 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,31 @@ env:


jobs:
check_changed_folders:
name: Check files
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Get changed files in the _distutils folder
id: changed-files-specific-distutils
uses: tj-actions/changed-files@v34
with:
files: |
setuptools/_distutils/**
- name: Get changed files in the _vendor folder
id: changed-files-specific-vendor
uses: tj-actions/changed-files@v34
with:
files: |
setuptools/_vendor/**
- name: Run step if any file(s) in the docs folder change
if: steps.changed-files-specific-distutils.outputs.any_changed == 'true' || steps.changed-files-specific-vendor.outputs.any_changed == 'true'
run: |
echo "One or more files in the setuptools/_distutils or setuptools/_vendor folder has changed."
exit 1
test:
strategy:
matrix:
Expand Down Expand Up @@ -111,6 +136,7 @@ jobs:
- integration-test
- test
- test_cygwin
- check_changed_folders

runs-on: ubuntu-latest

Expand Down