scenarios: add a test with a patch version in Requires-Python
#548
This file contains 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: Test | |
env: | |
# Enable colored output for pytest | |
# https://github.com/pytest-dev/pytest/issues/7443 | |
# https://github.com/actions/runner/issues/241 | |
PY_COLORS: 1 | |
on: | |
pull_request: | |
types: [opened, reopened, synchronize] | |
push: | |
branches: | |
- main | |
permissions: | |
contents: read | |
# Limit concurrency by workflow/branch combination | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
jobs: | |
python-tests: | |
name: python-${{ matrix.python-version }}, ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
python-version: | |
- "3.12" | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up uv | |
run: | | |
curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install packages | |
run: | | |
uv sync --all-extras --dev | |
- name: Run tests | |
run: | | |
uv run -- pytest tests |