Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Run patchcheck as a part of "Check generated files" job
  • Loading branch information
sobolevn committed Sep 15, 2023
commit 89ff09ed35dc474b8a816e7d41a3f73a967ea870
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ jobs:
- name: Check for unsupported C global variables
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
run: make check-c-globals
- name: Run patchcheck
if: github.event_name == 'pull_request' # $GITHUB_EVENT_NAME
run: |
git fetch origin
./python Tools/patchcheck/patchcheck.py --ci true

build_win32:
name: 'Windows (x86)'
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,3 @@ jobs:
with:
python-version: "3.x"
- uses: pre-commit/action@v3.0.0

patchcheck:
if: "github.repository == 'python/cpython' && github.event_name == 'pull_request'"
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: "Run patchcheck"
run: |
git status && git branch
python Tools/patchcheck/patchcheck.py --ci true
2 changes: 0 additions & 2 deletions Tools/patchcheck/patchcheck.py
Comment thread
sobolevn marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ def get_git_remote_default_branch(remote_name):
info=lambda x: x if x is not None else "not a PR branch")
def get_base_branch():
if not os.path.exists(os.path.join(SRCDIR, '.git')):
print('No', SRCDIR)
# Not a git checkout, so there's no base branch
return None
upstream_remote = get_git_upstream_remote()
Expand All @@ -109,7 +108,6 @@ def get_base_branch():
else:
base_branch = "{0.major}.{0.minor}".format(version)
this_branch = get_git_branch()
print(locals())
if this_branch is None or this_branch == base_branch:
# Not on a git PR branch, so there's no base branch
return None
Expand Down