Skip to content

Instantly share code, notes, and snippets.

View ckcollab's full-sized avatar

Eric Carmichael ckcollab

View GitHub Profile
@joshowen
joshowen / circle.yml
Last active January 10, 2023 13:19
CircleCI hack for saving keeping databases in build cache
# Notes:
# - Replace <DB_NAME> with your database
# - Replace <SOME_PROJECT_WITH_A_TEST> with an appname that has an integration test, this will run your migrations
database:
override:
# Preserve Postgres in cache
- sudo service postgresql stop || exit 0
- "if [ -d ~/postgres/ ]; then sudo cp -r ~/postgres/* /var/lib/postgresql/9.4; sudo chown -R postgres:postgres /var/lib/postgresql/9.4/*; fi"
- sudo service postgresql start || exit 0