Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache test requirements in GitHub actions #15301

Open
ikonst opened this issue May 24, 2023 · 0 comments
Open

Cache test requirements in GitHub actions #15301

ikonst opened this issue May 24, 2023 · 0 comments
Labels
feature topic-developer Issues relevant to mypy developers topic-tests

Comments

@ikonst
Copy link
Contributor

ikonst commented May 24, 2023

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. lsst-sqre/safir#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.

@ikonst ikonst added the feature label May 24, 2023
@AlexWaygood AlexWaygood added topic-developer Issues relevant to mypy developers topic-tests labels May 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature topic-developer Issues relevant to mypy developers topic-tests
Projects
None yet
Development

No branches or pull requests

2 participants