Bump the minor-and-patch group across 1 directory with 13 updates #64
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| get-python-versions: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| python-versions: ${{ steps.get-versions.outputs.python-versions }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' # Bootstrap version to read pyproject.toml | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - id: get-versions | |
| run: | | |
| uv pip install --system -e . # Install package to read metadata | |
| VERSIONS=$(python -c " | |
| from importlib.metadata import metadata | |
| import re | |
| import json | |
| meta = metadata('instate') | |
| req = meta['Requires-Python'] | |
| # Parse '>=3.11,<3.13' into ['3.11', '3.12'] | |
| min_match = re.search(r'>=(\d+)\.(\d+)', req) | |
| max_match = re.search(r'<(\d+)\.(\d+)', req) | |
| if min_match and max_match: | |
| min_major, min_minor = map(int, min_match.groups()) | |
| max_major, max_minor = map(int, max_match.groups()) | |
| versions = [] | |
| for major in range(min_major, max_major + 1): | |
| start_minor = min_minor if major == min_major else 0 | |
| end_minor = max_minor if major == max_major else 20 | |
| for minor in range(start_minor, end_minor): | |
| if (major, minor) < (max_major, max_minor): | |
| versions.append(f'{major}.{minor}') | |
| print(json.dumps(versions)) | |
| else: | |
| print('[\\"3.11\\"]') # fallback | |
| ") | |
| echo "python-versions=$VERSIONS" >> $GITHUB_OUTPUT | |
| testing: | |
| needs: get-python-versions | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ${{ fromJson(needs.get-python-versions.outputs.python-versions) }} | |
| exclude: | |
| # Exclude Python 3.13 on Windows due to numpy access violation issue | |
| - os: windows-latest | |
| python-version: "3.13" | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "latest" | |
| - name: Install dependencies | |
| run: | | |
| uv sync --group test | |
| - name: Run tests with pytest | |
| run: uv run pytest | |
| - name: Show dependency versions | |
| run: | | |
| uv run python -c "import torch, pandas as pd, numpy as np; print('PyTorch:', torch.__version__, '| Pandas:', pd.__version__, '| NumPy:', np.__version__)" |