File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ jobs:
157157 if : always()
158158
159159 needs :
160+ - check-changed-folders
160161 - integration-test
161162 - test
162163 - collateral
@@ -228,6 +229,38 @@ jobs:
228229 VM-${{ matrix.platform }},
229230 Py-${{ steps.python-install.outputs.python-version }}
230231 token : ${{ secrets.CODECOV_TOKEN }}
232+
233+ check-changed-folders :
234+ name : Fail the job if files changed under _disutils/_vendor folders
235+ if : github.event_name == 'pull_request'
236+ runs-on : ubuntu-latest
237+ steps :
238+ - name : Checkout code
239+ uses : actions/checkout@v3
240+ with :
241+ fetch-depth : 0
242+ - name : Check if files changed in the _distutils folder
243+ id : changed-files-specific-distutils
244+ uses : tj-actions/changed-files@v34
245+ with :
246+ files : |
247+ setuptools/_distutils/**
248+ - name : Check if files changed in the _vendor folder
249+ id : changed-files-specific-vendor
250+ uses : tj-actions/changed-files@v34
251+ with :
252+ files : |
253+ setuptools/_vendor/**
254+ - name : Fail the job if any file(s) in the _distutils folder change
255+ if : steps.changed-files-specific-distutils.outputs.any_changed == 'true'
256+ run : |
257+ echo "One or more files in the setuptools/_distutils folder has changed." | tee "${GITHUB_STEP_SUMMARY}"
258+ exit 1
259+ - name : Fail the job if any file(s) in the _vendor folder change
260+ if : steps.changed-files-specific-vendor.outputs.any_changed == 'true'
261+ run : |
262+ echo "One or more files in the setuptools/_vendor folder has changed." | tee "${GITHUB_STEP_SUMMARY}"
263+ exit 1
231264
232265 integration-test :
233266 needs : test
You can’t perform that action at this time.
0 commit comments