linters.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: Linters
  2. on:
  3. pull_request:
  4. paths-ignore:
  5. - 'docs/**'
  6. push:
  7. branches:
  8. - main
  9. paths-ignore:
  10. - 'docs/**'
  11. concurrency:
  12. group: ${{ github.workflow }}-${{ github.ref }}
  13. cancel-in-progress: true
  14. permissions:
  15. contents: read
  16. jobs:
  17. flake8:
  18. name: flake8
  19. runs-on: ubuntu-latest
  20. steps:
  21. - name: Checkout
  22. uses: actions/checkout@v4
  23. - name: Set up Python
  24. uses: actions/setup-python@v5
  25. with:
  26. python-version: '3.13'
  27. - run: python -m pip install flake8
  28. - name: flake8
  29. # Pinned to v3.0.0.
  30. uses: liskin/gh-problem-matcher-wrap@e7b7beaaafa52524748b31a381160759d68d61fb
  31. with:
  32. linters: flake8
  33. run: flake8
  34. isort:
  35. runs-on: ubuntu-latest
  36. steps:
  37. - name: Checkout
  38. uses: actions/checkout@v4
  39. - name: Set up Python
  40. uses: actions/setup-python@v5
  41. with:
  42. python-version: '3.13'
  43. - run: python -m pip install isort
  44. - name: isort
  45. # Pinned to v3.0.0.
  46. uses: liskin/gh-problem-matcher-wrap@e7b7beaaafa52524748b31a381160759d68d61fb
  47. with:
  48. linters: isort
  49. run: isort --check --diff django tests scripts
  50. black:
  51. runs-on: ubuntu-latest
  52. steps:
  53. - name: Checkout
  54. uses: actions/checkout@v4
  55. - name: black
  56. uses: psf/black@stable