name: Windows
on: [push, pull_request]

jobs:
  tests:
    runs-on: windows-latest
    strategy:
      fail-fast: false
      matrix:
        include:
        - python-version: 3.7
          env:
            TOXENV: windows-pinned
        - python-version: 3.8
          env:
            TOXENV: py
        - python-version: 3.9
          env:
            TOXENV: py
        - python-version: "3.10"
          env:
            TOXENV: py
        - python-version: "3.10"
          env:
            TOXENV: asyncio
# no binary package for lxml for 3.11 yet
#        - python-version: "3.11"
#          env:
#            TOXENV: py
#        - python-version: "3.11"
#          env:
#            TOXENV: asyncio

    steps:
    - uses: actions/checkout@v3

    - name: Set up Python ${{ matrix.python-version }}
      uses: actions/setup-python@v4
      with:
        python-version: ${{ matrix.python-version }}

    - name: Run tests
      env: ${{ matrix.env }}
      run: |
        pip install -U tox
        tox
