ci: skip Python quality checks for docs-only PRs

Abierto
#1,239 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
22/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Tranquilo
Stack tecnológico
github-actions
Área
ci-cd

Línea de trabajo

Start with the workflow files: ci.yml calls the reusable quality.yml, and the required check names come from that call structure. Compare Option B (a paths-filter step inside quality.yml) with the sibling-job approach, and confirm how GitHub reports skipped required checks. Done means docs-only PRs skip the expensive steps while code-checks / quality still reports success, which the maintainers must agree on first.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

enhancement p2

Problem

ci.yml has no path filters — the full Python quality suite (~20 min × 3 matrix versions) runs on every PR, including docs-only changes to docs/, PUBLISHING.md, CONTRIBUTING_DOCS.md, etc.

For docs-only PRs the Python tests provide no value: they don't touch mellea/, cli/, or test/. This wastes ~1 hour of runner time per docs PR and slows iteration on the documentation.

Constraint

code-checks / quality (3.11/3.12/3.13) are required status checks on main. Simply adding paths-ignore to ci.yml doesn't work — if the workflow doesn't run at all, GitHub marks the required checks as "missing" and blocks merge.

What counts as "docs-only"

A PR is docs-only if it only touches:

  • docs/**
  • *.md files in the repo root (CONTRIBUTING.md, RELEASE.md, etc.)
  • tooling/docs-autogen/** ← this one is borderline: the autogen tooling affects docs output but not the Python library. Could go either way.

Changes to mellea/**, cli/**, test/**, pyproject.toml, or uv.lock always require the full quality run.

Options

Option A — paths filter + sibling pass-through job (recommended)

Add a check-changes job to ci.yml using dorny/paths-filter to detect whether src files changed. Make code-checks conditional on the output. Add a sibling code-checks-skip job (same matrix, matching job names) that runs only when code-checks is skipped and immediately exits 0.

The tricky part: the required check context is code-checks / quality (3.11) — generated from the reusable workflow call structure. The skip job must produce check names that exactly match. This requires careful naming or using the GitHub Checks API to post synthetic results.

Option B — internal skip inside quality.yml

Add a dorny/paths-filter step at the top of quality.yml and wrap all subsequent steps in if: steps.filter.outputs.src == 'true'. The job always completes (satisfying the required check) but exits early for docs-only changes after just a few seconds.

Simpler than Option A. Downsides: still spins up a runner for each matrix version; harder to read.

Option C — merge queue bypass

Use a merge queue rule that skips required checks for PRs with only docs-label or a docs-only label. Requires merge queue configuration changes.

Suggested approach

Option B is the lowest-risk change: no required check naming games, no new workflows, just an early-exit path inside the existing quality workflow. A paths-filter step at the top of quality.yml that sets run_tests=false for docs-only changesets, followed by if: env.run_tests == 'true' on the expensive steps (install deps, pull Ollama, run pytest). The pre-commit step could still run on docs changes to catch markdownlint and codespell issues — or be skipped too.

Rough time saving: docs-only PRs go from ~20 min to ~30 seconds per matrix version.

Lenguaje dominante
Python
Estrellas
1.8k
Forks
161
Merge medio
4 d 3 h
PR fusionados (30 d)
45

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de generative-computing/mellea

Todos los issues de generative-computing/mellea

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.