mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-17 13:32:15 +00:00
Revert to using sqlite as tests just fail instantly with postgres due to incorrect number formatting when >= 10
This commit is contained in:
47
wercker.yml
47
wercker.yml
@@ -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
|
||||
@@ -28,11 +28,8 @@ build:
|
||||
# Read more about steps on our dev center:
|
||||
# http://devcenter.wercker.com/docs/steps/index.html
|
||||
steps:
|
||||
- script:
|
||||
name: install firefox and other things
|
||||
code: |
|
||||
sudo apt-get update
|
||||
sudo apt-get -y install firefox xvfb
|
||||
- install-packages:
|
||||
packages: firefox xvfb
|
||||
|
||||
- script:
|
||||
name: Enable virtual display
|
||||
@@ -44,10 +41,15 @@ build:
|
||||
# Give xvfb time to start. 3 seconds is the default for all xvfb-run commands.
|
||||
# sleep 3
|
||||
|
||||
- script:
|
||||
name: virtualenv install
|
||||
code: |
|
||||
pip install virtualenv
|
||||
|
||||
# A step that sets up the python virtual environment
|
||||
# - virtualenv:
|
||||
# name: setup virtual environment
|
||||
# install_wheel: false # Enable wheel to speed up builds (experimental)
|
||||
- virtualenv:
|
||||
name: setup virtual environment
|
||||
install_wheel: false # Enable wheel to speed up builds (experimental)
|
||||
|
||||
# # Use this virtualenv step for python 3.2
|
||||
# - virtualenv
|
||||
@@ -61,16 +63,17 @@ build:
|
||||
# A custom script step, name value is used in the UI
|
||||
# and the code value contains the command that get executed
|
||||
- script:
|
||||
name: echo python information
|
||||
name: Python Version
|
||||
code: |
|
||||
echo "python version $(python --version) running"
|
||||
echo "pip version $(pip --version) running"
|
||||
|
||||
# Django uses this to connect to the database
|
||||
- script:
|
||||
name: set postgres settings
|
||||
code: |
|
||||
export DATABASE_URL="postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@$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
|
||||
@@ -83,6 +86,12 @@ build:
|
||||
|
||||
# Run python tests
|
||||
- script:
|
||||
name: run tests with coverage
|
||||
name: run tests
|
||||
code: |
|
||||
coverage run manage.py test RIGS
|
||||
coverage run manage.py test RIGS
|
||||
|
||||
- script:
|
||||
name: collect coverage data
|
||||
code: |
|
||||
coverage report -m --include=PyRIGS/*.*,RIGS/*.* --omit=*/migrations/* | tee coverage.txt
|
||||
coverage html --include=PyRIGS/*.*,RIGS/*.* --omit=*/migrations/*
|
||||
Reference in New Issue
Block a user