mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 17:02:18 +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:
|
# You can also use services such as databases. Read more on our dev center:
|
||||||
# http://devcenter.wercker.com/docs/services/index.html
|
# http://devcenter.wercker.com/docs/services/index.html
|
||||||
services:
|
services:
|
||||||
- id: postgres
|
# - id: postgres
|
||||||
env:
|
# env:
|
||||||
POSTGRES_PASSWORD: pyrigstesting
|
# POSTGRES_PASSWORD: pyrigstesting
|
||||||
POSTGRES_USER: pyrigs
|
# POSTGRES_USER: pyrigs
|
||||||
# http://devcenter.wercker.com/docs/services/postgresql.html
|
# http://devcenter.wercker.com/docs/services/postgresql.html
|
||||||
|
|
||||||
# - mongodb
|
# - mongodb
|
||||||
@@ -28,11 +28,8 @@ build:
|
|||||||
# Read more about steps on our dev center:
|
# Read more about steps on our dev center:
|
||||||
# http://devcenter.wercker.com/docs/steps/index.html
|
# http://devcenter.wercker.com/docs/steps/index.html
|
||||||
steps:
|
steps:
|
||||||
- script:
|
- install-packages:
|
||||||
name: install firefox and other things
|
packages: firefox xvfb
|
||||||
code: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get -y install firefox xvfb
|
|
||||||
|
|
||||||
- script:
|
- script:
|
||||||
name: Enable virtual display
|
name: Enable virtual display
|
||||||
@@ -44,10 +41,15 @@ build:
|
|||||||
# Give xvfb time to start. 3 seconds is the default for all xvfb-run commands.
|
# Give xvfb time to start. 3 seconds is the default for all xvfb-run commands.
|
||||||
# sleep 3
|
# sleep 3
|
||||||
|
|
||||||
|
- script:
|
||||||
|
name: virtualenv install
|
||||||
|
code: |
|
||||||
|
pip install virtualenv
|
||||||
|
|
||||||
# A step that sets up the python virtual environment
|
# A step that sets up the python virtual environment
|
||||||
# - virtualenv:
|
- virtualenv:
|
||||||
# name: setup virtual environment
|
name: setup virtual environment
|
||||||
# install_wheel: false # Enable wheel to speed up builds (experimental)
|
install_wheel: false # Enable wheel to speed up builds (experimental)
|
||||||
|
|
||||||
# # Use this virtualenv step for python 3.2
|
# # Use this virtualenv step for python 3.2
|
||||||
# - virtualenv
|
# - virtualenv
|
||||||
@@ -61,16 +63,17 @@ build:
|
|||||||
# A custom script step, name value is used in the UI
|
# A custom script step, name value is used in the UI
|
||||||
# and the code value contains the command that get executed
|
# and the code value contains the command that get executed
|
||||||
- script:
|
- script:
|
||||||
name: echo python information
|
name: Python Version
|
||||||
code: |
|
code: |
|
||||||
echo "python version $(python --version) running"
|
echo "python version $(python --version) running"
|
||||||
echo "pip version $(pip --version) running"
|
echo "pip version $(pip --version) running"
|
||||||
|
|
||||||
# Django uses this to connect to the database
|
# Django uses this to connect to the database
|
||||||
- script:
|
# - script:
|
||||||
name: set postgres settings
|
# name: set environment
|
||||||
code: |
|
# code: |
|
||||||
export DATABASE_URL="postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_PORT_5432_TCP_ADDR:$POSTGRES_PORT_5432_TCP_PORT$POSTGRES_NAME"
|
# 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.
|
# A step that executes `pip install` command.
|
||||||
- pip-install
|
- pip-install
|
||||||
@@ -83,6 +86,12 @@ build:
|
|||||||
|
|
||||||
# Run python tests
|
# Run python tests
|
||||||
- script:
|
- script:
|
||||||
name: run tests with coverage
|
name: run tests
|
||||||
code: |
|
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