-
Notifications
You must be signed in to change notification settings - Fork 2
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 image results #97
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem to be solved
We now have caching of build layers (#2) so that the build step takes just seconds if nothign has changed. (e.g. push to main)
But the tests still takes tens of minutes to run. Some of that time is (in ascending duration):
When the image has the same sha as a previously tested image, there's no need to do the last two steps.
Description of design
First, use caching in the action runner (perhaps https://github.com/actions/cache) to check whether a particular test image (by sha) has already been run. If it has, trust that earlier run's status.
That will shave off most of the time. A further optimization is to get the sha before loading the image, and only loading if it needs to run locally.
It may be tempting to make a "verified" image that's like test but has the test as a RUN instead of ENTRYPOINT. One downside to that is we pay for build minutes, but not test minutes. Another is that conceptually, there's no need to tag and maintain such an image because it's internal state doesn't matter.
The text was updated successfully, but these errors were encountered: