Force fresh install from PyPi when testing latest version.
#47 geöffnet am 26. März 2025
Repository-Metriken
- Stars
- (2 Stars)
- PR-Merge-Metriken
- (PR-Metriken ausstehend)
Beschreibung
In the reusable workflow test_install.yml, we run a package's test suite on an installation of the latest version publish to PyPi. We run this installation test immediately after publishing, so we typically run into an issue where the latest published version hasn't yet propagated, so the workflow fails because it can't find the matching version in PyPi.
We've added a job that waits for a period after publishing before trying a test install. This seemed to help a little, but it's still not long enough, and the test usually fails and needs to be manually relaunched. Increasing the wait time is not desirable, as it increases workflow runtime.
The issue may just be that we need to somehow clear the PyPi cache in GitHub Actions or otherwise force GitHub Actions to look fresh at PyPi for the latest version.
Also, even if we figure out how to force a fresh installation, we may still need to keep some wait time to allow PyPi a chance to propagate the published version.
If we can increase the success rate of testing the installation of a version immediately after it was published, without increasing the wait time, we will have achieved the main objective. If we can also reduce the wait time, we will have achieved the ideal outcome.