Skip to content

chore(deps): bump the python-minor-patch group with 5 updates #57

chore(deps): bump the python-minor-patch group with 5 updates

chore(deps): bump the python-minor-patch group with 5 updates #57

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
include:
# The coverage cell enforces 100% (line + branch) and uploads to Codecov. Other
# cells only assert pass/fail: on < 3.14 the `sys.version_info >= (3, 11)` import
# branch is unreachable, so 100% is only attainable on the primary version.
- os: ubuntu-latest
python-version: "3.14"
coverage: true
- os: windows-latest
python-version: "3.14"
- os: macos-latest
python-version: "3.14"
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
# --locked: a lockfile that has drifted from pyproject.toml is an error. Plain `uv sync` would
# silently re-resolve and test a dependency set that is in nobody's checkout.
- name: Install dependencies
run: uv sync --locked
- name: Test with coverage (100% gate)
if: matrix.coverage
run: uv run pytest --cov-report=xml
# --no-cov, not `-o addopts=`: clearing addopts would drop --strict-markers along with coverage.
- name: Test
if: '!matrix.coverage'
run: uv run pytest --no-cov
- name: Upload coverage to Codecov
if: matrix.coverage
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.14"
- name: Install dependencies
run: uv sync --group typecheck --locked
- name: Ruff check
run: uv run ruff check src tests tools fuzz benchmarks
- name: Ruff format check
run: uv run ruff format --check src tests tools fuzz benchmarks
- name: Type check (ty)
run: uv run ty check
- name: Type check (mypy --strict)
run: uv run mypy --strict src/docopt2 tests/typing_surface/check_typed.py
- name: Type check (mypy --strict, floor target 3.10)
run: uv run mypy --strict --python-version 3.10 src/docopt2
- name: Type check (pyright)
run: uv run pyright src/docopt2 tests/typing_surface/check_typed.py
- name: Type check (pyright, floor target 3.10)
run: uv run pyright --pythonversion 3.10 src/docopt2
# The unit tests pin what the generated completion SCRIPTS say; they never run them, and that is exactly
# where a completion bug hides. This drives real shells through a pty and a real Tab keypress, and holds
# what they offer against the grammar. It is known to fail on an unfixed script, so it guards rather than
# decorates. PowerShell exposes its completion engine to code, so it runs on the Windows cell.
shells:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
- name: Install zsh and fish
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends zsh fish
- name: Install nushell
# Not in the Ubuntu repos; pinned to the version the completer targets (`commandline complete`
# landed in 0.114.0). Drop the release tarball on PATH.
if: runner.os == 'Linux'
run: |
curl -sSfL https://github.com/nushell/nushell/releases/download/0.114.1/nu-0.114.1-x86_64-unknown-linux-gnu.tar.gz | tar xz -C "$HOME"
echo "$HOME/nu-0.114.1-x86_64-unknown-linux-gnu" >> "$GITHUB_PATH"
- name: Complete in a real terminal
run: uv run --locked python tools/shell_check.py
ci-ok:
needs: [test, lint, shells]
if: always()
runs-on: ubuntu-latest
steps:
- name: Verify required jobs succeeded
run: >-
[ "${{ needs.test.result }}" = "success" ]
&& [ "${{ needs.lint.result }}" = "success" ]
&& [ "${{ needs.shells.result }}" = "success" ]