-
Notifications
You must be signed in to change notification settings - Fork 0
Update GHA workflow #30
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
Conversation
Codecov Report
@@ Coverage Diff @@
## main #30 +/- ##
=======================================
Coverage 79.34% 79.34%
=======================================
Files 4 4
Lines 92 92
=======================================
Hits 73 73
Misses 19 19
Flags with carried forward coverage won't be shown. Click here to find out more. Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Wow, does it reduce the runtime of the whole workflow from 1:45h to 1:15h? Compare https://github.com/pytask-dev/cookiecutter-pytask-project/actions/runs/3505768446/usage to https://github.com/pytask-dev/cookiecutter-pytask-project/actions/runs/3600786078/usage. Have you seen similar speed-ups? |
We need to add the same to the workflow in the template. |
I have not compared in detail, also because too many things in between two working versions changed when it came to the tests themselves. But I would not be surprised based on local observations if conda requires half a minute more to resolve the environment on a slow machine. Oh, I was reading minutes instead of hours 😆. Still, comparing individual tests you see that you gain a minute on Ubuntu for the environment generation step, will be much more on other OS's. |
One thing you may want to think about here is to get rid of tox, too (at least in the outer project). It definitely is a helpful tool when you want to make sure a library is working with all kinds of different dependencies. But here the main issue seems to be testing across operation systems, then you need GHA anyhow. What I view as an issue is that with the current setup, you have 3 different places for conda environments
Same for the inner project. Left me confused while debugging things on the other templates repo (same here why things suddenly failed in f1b8359... There I am down to one environment specified in the yaml file (plus the same for the inner project). |
I think the caching that is saving environments for one day is the main driver here. Especially on windows. And you are right, it would be even faster without tox. |
I am also not super happy with the tox setup. Here, it prevents caching, and you mentioned another issue. I generally like isolated environments for testing, but does it have many more benefits compared to using the main environment? |
On Ubuntu, that's 10s (27 on first run vs 17 on second AFAICT). |
On the CI machine no -- by definition you get a fresh environment by definition (well, gotta the micromamba guys to get the caching right). I think the main benefit of tox is that you can easily test many different configurations on local machines. Here, GHA gives you the same functionality. To the extent that you have one environment per project anyhow, I'd say it's good enough to use that also for testing -- especially if you are running the CI pipeline upon the next push. |
Changes
Some stuff from recent work over on econ-project-templates.
Have a look, maybe useful here, too!