name: conda-forge-windows
on:
  schedule:
    # Run this workflow once a week
    - cron: "0 0 * * 0"
  workflow_dispatch:

jobs:
  install:
    runs-on: windows-latest
    strategy:
      matrix:
        python-version: ["3.10", "3.11", "3.12", "3.13-dev"]
    steps:
      - name: Setup conda with mambaforge
        uses: conda-incubator/setup-miniconda@v3
        with:
          auto-update-conda: true
          miniforge-variant: Mambaforge
          miniforge-version: latest
          use-mamba: true
          python-version: ${{ matrix.python-version }}

      - name: Conda info
        shell: bash -l {0}
        run: conda info

      - name: Conda list
        shell: bash -l {0}
        run: conda list

      - name: Install and Test
        shell: bash -l {0}
        run: |
          mamba create -n pgv-testenv python=${{ matrix.python-version }}
          conda activate pgv-testenv
          mamba install --channel conda-forge pygraphviz
          mamba install --channel conda-forge pytest
          pytest --pyargs pygraphviz
