-
Notifications
You must be signed in to change notification settings - Fork 0
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 Beebop databases in CI #86
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #86 +/- ##
=======================================
Coverage 98.83% 98.83%
=======================================
Files 34 34
Lines 2060 2060
Branches 270 270
=======================================
Hits 2036 2036
Misses 24 24 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
So the database ends up in the cache because the first time it runs, the script will write it out to the host location of the bind mount?
README.md
Outdated
@@ -77,6 +77,8 @@ You can also run everything outside pm2, by separately running: | |||
- `./scripts/run_server` | |||
- `./scripts/run_client` | |||
|
|||
*Note: If you wish to override the volune with a custom bind mount pass in -mount {MOUNT_NAME} into `run_test` script* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
*Note: If you wish to override the volune with a custom bind mount pass in -mount {MOUNT_NAME} into `run_test` script* | |
*Note: If you wish to override the storage volume with a custom bind mount pass in -mount {MOUNT_NAME} into `run_test` script* |
scripts/run_dependencies
Outdated
while [ $# -gt 0 ]; do | ||
case "$1" in | ||
-mount) | ||
MOUNT="$2" | ||
shift 2 | ||
;; | ||
*) | ||
shift | ||
;; | ||
esac | ||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is shared logic with run _test to find the mount arg - could pull this out into a shared script - or just use a positional arg if it's easier! But it's quite nice and clear to have a named arg.
Yup exactly 😄 |
This PR does work to allow caching of the beebop databases. The playwright CI and jest integration CI both require pulling databases which can take a long time. These don't change thus we are now caching, so every subsequent run we don't have to redownload databases.
To allow caching having added
mount
cli option torun_tests
that allows to mount GHA directory into the/storage
folder (where dbs are downloaded)Testing: can re-run pipeline jest CI / unit_and_integration_backend (20.x) (pull_request) and you will see in logs of _run all components _ step that Database already exists for the multiple databases