Set wercker up to use postgres for tests again.

Modify the tests to be postgres compatible by using more pointers to things rather than getting them everytime.
This commit is contained in:
Tom Price
2016-03-31 16:03:07 +01:00
parent 463c4d147c
commit 8cfda69717
3 changed files with 128 additions and 101 deletions

View File

@@ -10,10 +10,10 @@ box: heroku/python
# You can also use services such as databases. Read more on our dev center:
# http://devcenter.wercker.com/docs/services/index.html
services:
# - id: postgres
# env:
# POSTGRES_PASSWORD: pyrigstesting
# POSTGRES_USER: pyrigs
- id: postgres
env:
POSTGRES_PASSWORD: pyrigstesting
POSTGRES_USER: pyrigs
# http://devcenter.wercker.com/docs/services/postgresql.html
# - mongodb
@@ -69,11 +69,11 @@ build:
echo "pip version $(pip --version) running"
# Django uses this to connect to the database
# - script:
# name: set environment
# code: |
# export DEBUG=0
# export DATABASE_URL="postgres://pyrigs:pyrigstesting@$POSTGRES_PORT_5432_TCP_ADDR:$POSTGRES_PORT_5432_TCP_PORT$POSTGRES_NAME"
- script:
name: set environment
code: |
export DEBUG=0
export DATABASE_URL="postgres://pyrigs:pyrigstesting@$POSTGRES_PORT_5432_TCP_ADDR:$POSTGRES_PORT_5432_TCP_PORT$POSTGRES_NAME"
# A step that executes `pip install` command.
- pip-install
@@ -100,4 +100,4 @@ build:
name: collect coverage data
code: |
coverage report -m --include=PyRIGS/*.*,RIGS/*.* --omit=*/migrations/* | tee coverage.txt
coverage html --include=PyRIGS/*.*,RIGS/*.* --omit=*/migrations/*
coverage html --include=PyRIGS/*.*,RIGS/*.* --omit=*/migrations/*