Skip to content

nameparser 2.0 implementation #414

nameparser 2.0 implementation

nameparser 2.0 implementation #414

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Test the Python package
on:
workflow_dispatch:
push:
branches: [ master ]
pull_request:
branches: [ master ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14", "3.15"]
# 3.15 is pre-release until 2026-10-01 (#259): surface breakage
# without blocking the branch; flip to blocking when it goes final.
continue-on-error: ${{ matrix.python-version == '3.15' }}
env:
# Without this, uv sync honors .python-version (3.11) over the
# matrix interpreter and every job silently tests 3.11.
UV_PYTHON: ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Install dependencies
run: uv sync --group dev
- name: Run linter
run: uv run ruff check
- name: Check types
run: uv run mypy
- name: Run Tests
run: |
uv run pytest --cov=nameparser --cov-report=xml
uv run --with build python -m build --sdist
uv run --with twine twine check dist/*
uv run sphinx-build -b html docs dist/docs
uv run sphinx-build -b doctest docs dist/doctest
uv run python -m doctest README.rst
- name: Upload coverage to Codecov
if: matrix.python-version == '3.13'
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: false