tmt icon indicating copy to clipboard operation
tmt copied to clipboard

Add caching of pip, hatch and hatch envs in doc-tests workflow and de-duplicate the env setup

Open martinhoyer opened this issue 1 year ago • 1 comments

  • Adding pip cache for docs test and release actions. pre-commit action has it's own cache and in testing, there was no benefit in adding pip cache at all.

  • Consolidating the html and linkcheck jobs to a single one to only run one checkout, python-setup(incl. cache) and pip install hatch.

  • Adding cache action for hatch environments for docs-test.

martinhoyer avatar Sep 26 '24 12:09 martinhoyer

Argh, I can't get it to use the hash of PIPX_HOME/.cache/CACHEDIR.TAG. Cache saved with key: Linux-pipx-home- That's the last thing to figure out.

Oh and I was thinking about adding a check to only start docs-test if certain files/dirs were changes, as there are many changes in PRs that don't affect docs. I'm not confident to put together a list of dirs/files to ignore though.

martinhoyer avatar Oct 07 '24 13:10 martinhoyer

https://github.com/teemtee/tmt/pull/3241/commits/34534cc4a4bcc0d62ee645f7139cf4c780091f89 on second thought, maybe best to not have any cache for release. Since it's execution is so rare, it wouldn't be much of a benefit anyway.

martinhoyer avatar Oct 10 '24 12:10 martinhoyer

ok and the hatch installation takes 5 secs, but all packages are installed from cache.

martinhoyer avatar Oct 10 '24 12:10 martinhoyer

34534cc on second thought, maybe best to not have any cache for release. Since it's execution is so rare, it wouldn't be much of a benefit anyway.

oh yeah, that one is hatch-based also so it wouldn't do much either.

LecrisUT avatar Oct 10 '24 12:10 LecrisUT

/packit test

happz avatar Oct 11 '24 13:10 happz