Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Commit

Permalink
Merge branch 'develop' of https://github.com/ic-labs/django-icekit in…
Browse files Browse the repository at this point in the history
…to develop
  • Loading branch information
Sam Minton committed Oct 5, 2016
2 parents 59cb1aa + dbe6b20 commit 1ebc8a0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
12 changes: 11 additions & 1 deletion docs/contributing/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,18 @@ test database and restores from `test_initial_data.sql` if available,

This reuses the test databases, and skips collectstatic and compress steps.

To achieve permanent speedip, create a data dump called `test_initial_data.sql`
### To create a data dump with migrations applied

To achieve permanent speedup, create a data dump called `test_initial_data.sql`
with migrations applied. It will be restored to the test database in
`runtests.sh`, bypassing all migrations.

1. Create a fresh database `foo`
2. Run migrations:

manage.py migrate

3. Dump the database to `test_initial_data.sql`

`pg_dump -O -x -f test_initial_data.sql -d foo`

3 changes: 3 additions & 0 deletions icekit/bin/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ export BASE_SETTINGS_MODULE="${BASE_SETTINGS_MODULE:-develop}"
# Get number of CPU cores, so we know how many processes to run.
export CPU_CORES=$(python -c 'import multiprocessing; print multiprocessing.cpu_count();')

# Place GPG home directory in project directory.
export GNUPGHOME="$ICEKIT_PROJECT_DIR/.gnupg"

# Get absolute directory for the `icekit` package.
export ICEKIT_DIR=$(python -c 'import icekit, os; print os.path.abspath(os.path.dirname(icekit.__file__));')

Expand Down
3 changes: 0 additions & 3 deletions icekit/bin/setup-git-secret.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,6 @@ set -e

cd "$ICEKIT_PROJECT_DIR"

# Place GPG home directory in project directory.
export GNUPGHOME="$ICEKIT_PROJECT_DIR/.gnupg"

# Derive a fictitious email address for the encryption key.
export GPG_EMAIL="${GPG_EMAIL:-git-secret@$ICEKIT_PROJECT_NAME.icekit.interaction.net.au}"

Expand Down

0 comments on commit 1ebc8a0

Please sign in to comment.