python-ci

Configures GitHub Actions CI/CD workflows for Python projects with uv, ruff, mypy, and pytest.

Updated Jul 29, 2026
One-click install
npx skills add https://github.com/chris-prener/dev-kit --skill python-ci-chris-prener
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: python-ci
Source: https://github.com/chris-prener/dev-kit/tree/main/dev-kit/skills/python-ci
Command: npx skills add https://github.com/chris-prener/dev-kit --skill python-ci-chris-prener

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Setting up continuous integration for Python projects involves repetitive decisions about workflow structure, dependency caching, quality gates, and coverage reporting. This Skill provides ready-to-use GitHub Actions templates and conventions so you get a consistent, fast CI pipeline without designing it from scratch each time. ## Core Features & Use Cases - Workflow Templates: Prebuilt GitHub Actions workflows for test/lint/type-check, multi-OS matrix builds, PyPI publishing, and Prefect pipeline runs. - uv Caching and Locking: Cache configuration via astral-sh/setup-uv with uv sync --locked enforcement to catch lockfile drift. - Quality Gates and Coverage: Required status checks for ruff, mypy, and pytest, plus Codecov coverage reporting and a debugging guide for common CI failures. - Use Case: You are starting a new Python package and need CI that runs tests across Ubuntu, Windows, and macOS on Python 3.10-3.12, enforces lint and type checks on every PR, and publishes to PyPI on tag pushes. ## Quick Start Set up a GitHub Actions CI workflow for my Python project with uv caching, ruff and mypy gates, pytest, and coverage reporting.

Frequently Asked Questions about python-ci

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up GitHub Actions CI for a Python project with uv?▼

Use the astral-sh/setup-uv action with enable-cache: true and cache-dependency-glob pointing at uv.lock, then run uv sync --locked --all-extras followed by ruff, mypy, and pytest steps. The --locked flag fails the build if pyproject.toml and uv.lock have drifted.

How do I test Python across multiple operating systems in GitHub Actions?▼

Define a matrix strategy with os set to ubuntu-latest, windows-latest, and macos-latest, plus a python-version list such as 3.10 through 3.12. Install the matrix Python version with uv python install and sync dependencies per matrix cell.

Why does uv sync --locked fail in CI?▼

It fails when pyproject.toml and uv.lock are out of sync, meaning dependencies were changed without regenerating the lockfile. Run uv lock locally and commit the updated uv.lock to fix it.

How do I add coverage reporting to a Python GitHub Actions workflow?▼

Run pytest with --cov=src --cov-report=xml to generate coverage.xml, then upload it with codecov/codecov-action. Coverage is typically advisory rather than a merge-blocking check.

How do I publish a Python package to PyPI from GitHub Actions?▼

Trigger a workflow on tag pushes, build with uv build, verify with twine check, and publish with uv publish. Grant id-token: write permission to use PyPI trusted publishing instead of stored API tokens.

When should I not use this Python CI skill?▼

It does not cover local-only testing, package structure decisions, dependency management issues, or CI for non-Python projects. Those belong to separate testing, packaging, and dependency workflows.