alunduil / alunduil/zfs-replicate

setup-poetry installs the environment for the jobs that need one

Ouverte
#688 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
enhancement
Langage dominant
Python
Étoiles
24
Forks
6
Merge moyen
3 h 11 min
PR mergées (30 j)
49

Description

Four jobs open with the same three steps: `actions/checkout`, `./.github/actions/setup-poetry`, then `poetry install`. `python-tests`, `cli-entry-point`, and the `coverage` job added in #687 run it verbatim; `daily.yml`'s `mutation-score` runs it with `--with mutation`. `build` is the one caller that stops after `setup-poetry`, because it never runs project code.

That's Fowler's Extract Function on a repeated preamble, and it was declined in #687 to keep that pull request to one concern. `setup-poetry`'s own header records the decision it would revisit:

> No `poetry install`: callers that run project code install the environment themselves, so callers that only build or inspect skip the cost.

The rule of three now says otherwise, so the question is whether an input is the better shape.

- [ ] Give `setup-poetry` an input that installs the environment, with the groups to install as its value so `mutation-score` can pass `mutation` and the rest can take the default.
- [ ] Collapse the `poetry install` step in `python-tests`, `cli-entry-point`, `coverage`, and `mutation-score` into that input.
- [ ] Leave `build` calling the action without it, and update the header comment to say what the input is for rather than why there isn't one.

## Additional context

- A composite action can't run `actions/checkout` for the repository it lives in, so the checkout step stays with each caller either way. Only the install collapses.

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Start with .github/actions/setup-poetry and the workflow callers containing python-tests, cli-entry-point, coverage, mutation-score, and build. Add the installation input and group handling described in the checklist, move the four poetry install steps into that input, leave build unchanged, update the header, and verify the workflows retain their intended installation behavior.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
github-actions, python
Domaine
build-system, ci-cd
Type d'issue
Refactorisation
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Active
Clarté
Clairement spécifiée
Accessibilité débutants
78/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.