linters.yml 980 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. jobs:
  12. flake8:
  13. name: flake8
  14. runs-on: ubuntu-latest
  15. steps:
  16. - name: Checkout
  17. uses: actions/checkout@v2
  18. - name: Set up Python
  19. uses: actions/setup-python@v2
  20. with:
  21. python-version: '3.10'
  22. - run: python -m pip install flake8
  23. - name: flake8
  24. uses: liskin/gh-problem-matcher-wrap@v1
  25. with:
  26. linters: flake8
  27. run: flake8
  28. isort:
  29. runs-on: ubuntu-latest
  30. steps:
  31. - name: Checkout
  32. uses: actions/checkout@v2
  33. - name: Set up Python
  34. uses: actions/setup-python@v2
  35. with:
  36. python-version: '3.10'
  37. - run: python -m pip install isort
  38. - name: isort
  39. uses: liskin/gh-problem-matcher-wrap@v1
  40. with:
  41. linters: isort
  42. run: isort --check --diff django tests scripts