|
| 1 | +# -- SOURCE: https://github.com/marketplace/actions/setup-python |
| 2 | +# SEE: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python |
| 3 | +# SUPPORTED PYTHON VERSIONS: https://github.com/actions/python-versions |
| 4 | + |
| 5 | +name: test-windows |
| 6 | +on: |
| 7 | + workflow_dispatch: |
| 8 | + push: |
| 9 | + branches: [ "main", "release/**" ] |
| 10 | + pull_request: |
| 11 | + types: [opened, reopened, review_requested] |
| 12 | + branches: [ "main" ] |
| 13 | + |
| 14 | +env: |
| 15 | + PYTHONUTF8: 1 |
| 16 | + |
| 17 | +jobs: |
| 18 | + test: |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + matrix: |
| 22 | + # PREPARED: os: [ubuntu-latest, macos-latest, windows-latest] |
| 23 | + # DISABLED: os: [ubuntu-latest, windows-latest] |
| 24 | + python-version: ["3.13", "3.12", "3.11", "3.10"] |
| 25 | + # -- PREPARED FOR: Experimental Python versions with "continue-on-error". |
| 26 | + experimental: [false] |
| 27 | + include: |
| 28 | + - python-version: "3.14.0-rc.1" |
| 29 | + experimental: true |
| 30 | + # -- DISABLED: |
| 31 | + # exclude: |
| 32 | + # - os: windows-latest |
| 33 | + # python-version: "2.7" |
| 34 | + # DISABLED: runs-on: ${{ matrix.os }} |
| 35 | + runs-on: "windows-latest" |
| 36 | + continue-on-error: ${{ matrix.experimental }} |
| 37 | + steps: |
| 38 | + - uses: actions/checkout@v5 |
| 39 | + # DISABLED: name: Setup Python ${{ matrix.python-version }} on platform=${{ matrix.os }} |
| 40 | + - uses: actions/setup-python@v5 |
| 41 | + with: |
| 42 | + python-version: ${{ matrix.python-version }} |
| 43 | + # DISABLED: cache: 'pip' |
| 44 | + # DISABLED: cache-dependency-path: 'py.requirements/*.txt' |
| 45 | + # -- DISABLED: |
| 46 | + # - name: Show Python version |
| 47 | + # run: python --version |
| 48 | + - name: setup-uv -- Speed-up Python package installations ... |
| 49 | + uses: astral-sh/setup-uv@v3 |
| 50 | + with: |
| 51 | + enable-cache: true |
| 52 | + cache-dependency-glob: | |
| 53 | + **/pyproject.toml |
| 54 | + **/py.requirements/ci.github.testing.txt |
| 55 | + **/py.requirements/basic.txt |
| 56 | + **/py.requirements/testing.txt |
| 57 | + - name: "Install Python package dependencies (with: uv)" |
| 58 | + run: | |
| 59 | + uv pip install --system -U pip setuptools wheel |
| 60 | + uv pip install --system -U -r py.requirements/ci.github.testing.txt |
| 61 | + uv pip install --system -e . |
| 62 | + - name: Run tests |
| 63 | + run: pytest |
| 64 | + - name: Upload test reports |
| 65 | + uses: actions/upload-artifact@v4 |
| 66 | + with: |
| 67 | + name: test reports |
| 68 | + path: | |
| 69 | + build/testing/report.xml |
| 70 | + build/testing/report.html |
| 71 | + if: ${{ job.status == 'failure' }} |
| 72 | + # MAYBE: if: ${{ always() }} |
0 commit comments