name: Python tests

on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.7", "3.8", "3.9", "3.10"]
        django: ["3.2", "4.0"]
        exclude:
          - python-version: "3.7"
            django: "4.0"

    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -q Django==${{ matrix.django }} requests mock hypernova
    - name: Test
      run: |
        python runtests.py
    - name: "Run isort checks for ${{ matrix.python-version }}"
      run: |
        isort . --check-only

name: Run tests and lint

on: [push, pull_request]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        python-version: ["3.7", "3.8", "3.9", "3.10"]
        django: ["3.2", "4.0"]
        exclude:
          - python-version: "3.7"
            django: "4.0"
    steps:
    - uses: actions/checkout@v2
    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v2
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install dependencies
      run: |
        python -m pip install --upgrade pip
        pip install -q Django==${{ matrix.django }} requests mock hypernova
    - name: Test
      run: |
        python runtests.py
  lint-black:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: psf/black@stable
        with:
          options: "--check --verbose"
          src: "."
          version: "21.5b1"
  lint-isort:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: 3.8
      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install isort
          isort . --check-only

Add black and isort to ci
Add black and isort to ci
