Skip to content

Commit 43e8a67

Browse files
romanlutzCopilot
andauthored
MAINT: Run pre-commit on all files for every event (microsoft#2105)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 1cb87a5 commit 43e8a67

1 file changed

Lines changed: 7 additions & 11 deletions

File tree

.github/workflows/build_and_test.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,19 +68,15 @@ jobs:
6868
shell: bash
6969
run: df -all -h
7070

71-
- name: Run pre-commit incrementally (on PR)
72-
if: github.event_name == 'pull_request'
73-
env:
74-
RUN_LONG_PRECOMMIT: true
71+
- name: Run pre-commit (all files)
72+
# Always lint the ENTIRE repository on every event (pull_request,
73+
# merge_group, push to main, workflow_dispatch). Running --all-files on
74+
# PRs -- rather than only the files changed since origin/main -- ensures
75+
# latent violations in untouched files, including the tests/integration,
76+
# tests/partner_integration, and tests/end_to_end tiers, are caught before
77+
# merge instead of only on the post-merge run against main.
7578
run: |
7679
git fetch origin main
77-
uv run pre-commit run --from-ref origin/main --to-ref HEAD
78-
79-
- name: Run pre-commit fully (on main)
80-
if: github.ref == 'refs/heads/main'
81-
env:
82-
RUN_LONG_PRECOMMIT: true
83-
run: |
8480
uv run pre-commit run --all-files
8581
8682
# Main job runs only if pre-commit succeeded

0 commit comments

Comments
 (0)