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