From fcd87a082d72659fb9093f0c71c9a8fc039a10e7 Mon Sep 17 00:00:00 2001 From: Tom Price Date: Wed, 9 Sep 2015 15:30:12 +0100 Subject: [PATCH] Revert to using sqlite as tests just fail instantly with postgres due to incorrect number formatting when >= 10 --- wercker.yml | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/wercker.yml b/wercker.yml index 90483554..a2a3f6d0 100644 --- a/wercker.yml +++ b/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 \ No newline at end of file + 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/* \ No newline at end of file