Cache test requirements in GitHub actions
Nessuno ha ancora preso questa issue.
- Lingua principale
- Python
- Stelle
- 20.6k
- Fork
- 3.3k
- Merge medio
- 1g 18h
- PR unite (30g)
- 54
Descrizione
Currently we install them with tox, which is not cached, and appears to take >1 min of the test time. Should we see if caching could reduce it?
One option is to cache .tox -- e.g. https://github.com/lsst-sqre/safir/issues/2
Another is probably to move off tox. (Per About caching workflow dependencies, GitHub workflows would cache dependencies with minimal configuration effort.)
If we called pip directly rather than isolating in tox, something like this could work:
- uses: actions/setup-python@v4
with:
...
cache: 'pip'
cache-dependency-path: |
mypy-requirements.txt
build-requirements.txt
test-requirements*.txt
Note that I'm not actively pitching to reduce reliance on tox, merely bringing it up as a possibility.
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Direzione di ricerca
Inizia esaminando i workflow di GitHub Actions e la configurazione di tox, insieme a mypy-requirements.txt, build-requirements.txt e test-requirements*.txt. Confronta il caching di .tox con l'opzione di cache pip di setup-python. Il lavoro è completato quando l'approccio scelto riduce l'installazione ripetuta delle dipendenze di test e il workflow di test continua a superare i test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- github-actions, python
- Ambito
- ci-cd, performance
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Da chiarire
- Idoneità per principianti
- 35/100