pre-commit.yml 846 B

12345678910111213141516171819202122232425262728293031
  1. name: pre-commit
  2. permissions:
  3. contents: read
  4. concurrency:
  5. group: ${{ github.workflow }}-${{ github.event.pull_request.id }}
  6. cancel-in-progress: true
  7. on:
  8. pull_request:
  9. branches: ["main"]
  10. push:
  11. # Note even though this job is called "pre-commit" and runs "pre-commit", this job will run
  12. # also POST-commit on main also! In case there are mishandled merge conflicts / bad auto-resolves
  13. # when merging into main branch.
  14. branches: ["main"]
  15. jobs:
  16. pre-commit:
  17. timeout-minutes: 30
  18. runs-on: ubuntu-latest
  19. steps:
  20. - uses: actions/checkout@v4
  21. - uses: ./.github/actions/setup_build_env
  22. with:
  23. python-version: 3.13
  24. run-uv-sync: true
  25. - uses: actions/checkout@v4
  26. with:
  27. clean: false
  28. - run: uv run pre-commit run --all-files --show-diff-on-failure