name: CI

on:
  push:
    branches: [master, main]
  pull_request:
jobs:
  build:

    runs-on: ubuntu-latest
    strategy:
      matrix:
        python: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']

    steps:
      - uses: actions/checkout@v2
      - name: Setup Python
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python }}
      - name: Install requirements
        run: |
         pip install -U pip
         pip install -r requirements-dev.txt
         pip install .
      - name: Run pytest
        run: pytest tests
      - name: Run mypy
        run:  mypy overrides
      - name: Run mypy static tests (Python=3.11)
        if: matrix.python == '3.11'
        run: ./check_mypy.sh
