name: Python testing

on: [push, pull_request]

jobs:
  build:

    runs-on: ${{ matrix.os }}
    strategy:
      max-parallel: 4
      matrix:
        os: [ubuntu-latest, windows-latest]
        python-version: [3.7, 3.8, 3.9]

    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
        python -m pip install --upgrade setuptools wheel
        python -m pip install --upgrade -r requirements.txt
        python -m pip install --upgrade -r requirements-dev.txt
        python -m pre_commit install -t pre-commit
        python -m pre_commit install -t pre-push
    - name: Lint and test
      run: |
        python -m pre_commit run --all-files --show-diff-on-failure --hook-stage commit
        python -m pre_commit run --all-files --show-diff-on-failure --hook-stage push

Add a GitHub Actions work flow for automated testing.
Add a GitHub Actions work flow for automated testing.
