Skip CI Tests Based on Checks, Not Action File

Abierto
#8,971 3 comentarios 0 reacciones 1 asignado Ver en GitHub

@ericspod ya está trabajando en esto.

Desde el 2/7/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

CI/CD Feedback welcomed

Is your feature request related to a problem? Please describe.
An attempt was made to avoid running tests when only documentation was changed by adding patterns to paths-ignore in the actions files. This has the effect of making checks not run which blocks PRs, the hope was instead that these would show up as successfully ignored but it's not to be.

The alternative is to conditions the steps of jobs within actions on a check against changes. My idea is to use checking code in one job to detect if there's code change in Python files or changes in any other non-documentation file, then condition steps on that result. This would cause documentation only changes to not trigger tests, so changes to documentation files are ignored, and Python changes affecting only docstrings or comments are ignored.

Describe the solution you'd like
A prototype solution is here: https://github.com/ericspod/ActionsTest/blob/768a042fe2ae0693b528486be438b74081d77406/.github/workflows/test.yml

This uses a Python script to parse source files and compare them at the AST level, while also ignoring documentation files. Any other file changes trigger tests just in case. This uses the standard library so no dependencies exist other than Python.

The first job uses this script inside a bash loop going through every changed file. The output is then used by subsequent jobs to skip the test steps if no changes are found, so the job runs successfully even if nothing is done.

Describe alternatives you've considered
Using paths-ignore won't work in conjunction with require job passes for PRs to be mergeable. There isn't another actions mechanism to do this it seems.

Lenguaje dominante
Python
Estrellas
8.7k
Forks
1.6k
Merge medio
5 d 1 h
PR fusionados (30 d)
20

Guía de contribución

Abrir la guía de contribución

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 Project-MONAI/MONAI

Todos los issues de Project-MONAI/MONAI

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.