name: ci

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master
  schedule:
    - cron: '00 12 * * 1' # Runs every Monday at 8:00 AM EST

jobs:
  Test:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        python-version: ["3.7", "3.8", "3.9", "3.10"]
        os: [ubuntu-latest, macos-latest, windows-latest]
    steps:
      - uses: actions/checkout@v2
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v2
        with:
          python-version: ${{ matrix.python-version }}

      - name: Check
        shell: bash
        run: |
          python3 -m pip install --upgrade pip
          pip install -e .
          python3 -m unittest discover -v tests
          python3 setup.py install
