Closed jordanperr closed 2 years ago
It appears the github action setup-python (which we are already using in our pipeline) has a built in dependency caching feature. If my understanding of this is correct, it would use cached versions of the dependencies as long as the requirements.txt file remains unchanged. Downloading new versions of the dependencies when the requirements file changes.
Link to documentation for setup-python caching.
I implemented the change in this branch and will test the functionality before submitting a pull request: https://github.com/jordanperr/OpenOA/tree/maintenence/12-02-2021-enable-dependency-caching
Hey @jordanperr can I work on this ? I'd love to contribute to the repository and this seems like a "good first issue"
Hi @SauravMaheshkar , thank you so much for your interest. I apologize for not getting back to you sooner. We have decided to move away from caching and instead add a scheduled build to the workflow to catch these issues earlier: https://github.com/NREL/OpenOA/blob/c1c163007d16986d04bc34deefbf1c1e1c754aa8/.github/workflows/ci-tests.yml#L8
I would be very interested to hear any other ideas on how to improve this CI pipeline. Closing the issue for now.
We've been having recurring issues with the CI pipeline breaking for reasons unrelated to the pull request at hand. The main reason for this issue is that packages are updated in public registries, which our CI pipeline then pulls from.
One solution is to implement a containerized CI/CD pipeline. That is, build a Docker container - and host this on DockerHub - which contains a static version of the environment. Typically, the creation of this container is also an automated process.