Cache test requirements in GitHub actions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 20.6k
- Forks
- 3.3k
- PR merge metrics
- PR metrics pending
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the GitHub Actions workflows and the tox setup, along with mypy-requirements.txt, build-requirements.txt, and test-requirements*.txt. Compare caching .tox with setup-python's pip cache option. Done means the chosen approach reduces repeated test dependency installation while the test workflow remains passing.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python
- Domain
- ci-cd, performance
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100