name: Tests

on:
  pull_request:
    branches:
    - master
  push:
    branches:
    - master

jobs:
  test:
    runs-on: ${{ matrix.platform }}
    strategy:
      fail-fast: false
      matrix:
        platform:
        - ubuntu-latest
        - macos-latest
        - windows-latest
        python-version:
        - '3.7'
        - '3.8'
        - '3.9'
        - '3.10'
        - '3.11'
    steps:
    - uses: actions/checkout@v3
    - uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}
    - name: Install prerequisites
      run: |
        python -m pip install --upgrade pip
        python -m pip install wheel tox-gh-actions
    - name: Run tests
      run: tox