pre-commit.yml 937 B

1234567891011121314151617181920212223242526272829303132
  1. name: pre-commit
  2. concurrency:
  3. group: ${{ github.workflow }}-${{ github.event.pull_request.id }}
  4. cancel-in-progress: true
  5. on:
  6. pull_request:
  7. branches: ["main"]
  8. push:
  9. # Note even though this job is called "pre-commit" and runs "pre-commit", this job will run
  10. # also POST-commit on main also! In case there are mishandled merge conflicts / bad auto-resolves
  11. # when merging into main branch.
  12. branches: ["main"]
  13. jobs:
  14. pre-commit:
  15. timeout-minutes: 30
  16. runs-on: ubuntu-latest
  17. steps:
  18. - uses: actions/checkout@v4
  19. - uses: ./.github/actions/setup_build_env
  20. with:
  21. # running vs. one version of Python is OK
  22. # i.e. ruff, black, etc.
  23. python-version: 3.12.8
  24. run-uv-sync: true
  25. # TODO pre-commit related stuff can be cached too (not a bottleneck yet)
  26. - run: uv run pre-commit run --all-files
  27. env:
  28. SKIP: update-pyi-files