name: pytest
on:
  workflow_dispatch:
  schedule:
    - cron:  '0 4 * * MON'
  pull_request:
    branches:
      - master
  push:
    branches:
      - master
jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        python: [3.9, 3.10-dev]
    steps:
      - uses: actions/checkout@v2
      - name: Setup Python ${{ matrix.python }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python }}
      - name: Install tox
        run: |
          python -m pip install --upgrade pip
          pip install tox
      - name: Run tests
        run: tox -e py
