It takes poetry surprisingly long to resolve the dependencies every time the tests are run. We can avoid that by "locking" the versions of the dependencies and update them periodically instead.
Also, we can make better use of Docker's caching of image layers by installing poetry early before the source code is copied into the build context (otherwise, installation of poetry happens every time the source code is updated).
The latter only affects local execution of tests, as we don't save Docker images between CI runs. I've tried https://github.com/satackey/action-docker-layer-caching/, but the results were disappointing -- I think we need to reduce the image size first and make sure we don't go over the limit of concurrent requests to the Github Caching service.
It takes poetry surprisingly long to resolve the dependencies every time the tests are run. We can avoid that by "locking" the versions of the dependencies and update them periodically instead.
Also, we can make better use of Docker's caching of image layers by installing poetry early before the source code is copied into the build context (otherwise, installation of poetry happens every time the source code is updated).
The latter only affects local execution of tests, as we don't save Docker images between CI runs. I've tried https://github.com/satackey/action-docker-layer-caching/, but the results were disappointing -- I think we need to reduce the image size first and make sure we don't go over the limit of concurrent requests to the Github Caching service.