linters.yml 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. jobs:
  15. flake8:
  16. name: flake8
  17. runs-on: ubuntu-latest
  18. steps:
  19. - name: Checkout
  20. uses: actions/checkout@v3
  21. - name: Set up Python
  22. uses: actions/setup-python@v4
  23. with:
  24. python-version: '3.10'
  25. - run: python -m pip install flake8
  26. - name: flake8
  27. uses: liskin/gh-problem-matcher-wrap@v1
  28. with:
  29. linters: flake8
  30. run: flake8
  31. isort:
  32. runs-on: ubuntu-latest
  33. steps:
  34. - name: Checkout
  35. uses: actions/checkout@v3
  36. - name: Set up Python
  37. uses: actions/setup-python@v4
  38. with:
  39. python-version: '3.10'
  40. - run: python -m pip install isort
  41. - name: isort
  42. uses: liskin/gh-problem-matcher-wrap@v1
  43. with:
  44. linters: isort
  45. run: isort --check --diff django tests scripts
  46. black:
  47. runs-on: ubuntu-latest
  48. steps:
  49. - name: Checkout
  50. uses: actions/checkout@v3
  51. - name: black
  52. uses: psf/black@stable