name: Check style

on:
  push:
    branches: [ main ]
  pull_request:

jobs:
  black:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: psf/black@stable
        with:
          options: "--check --diff"
          version: "22.3.0"
  isort:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions/setup-python@v2
        with:
          python-version: 3.8
      - uses: isort/isort-action@master
        with:
          isortVersion: "5.10.1"
