diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 23278e5..78215d1 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -5,16 +5,16 @@ name: Python package on: push: - branches: [ master ] + branches: [ "*" ] pull_request: branches: [ master ] jobs: build: - - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: + os: [ubuntu-latest, windows-latest] python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] steps: @@ -23,10 +23,20 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + + - name: Install dependencies (Linux/macOS) + if: runner.os != 'Windows' run: | python -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt -r requirements_dev.txt; fi + + - name: Install dependencies (Windows) + if: runner.os == 'Windows' + run: | + python -m pip install --upgrade pip + if (Test-Path requirements.txt) { pip install -r requirements.txt -r requirements_dev.txt } + shell: pwsh + - name: Test with pytest run: | python -m pytest -v -x test