mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-24 08:52:15 +00:00
Update wrecker.yml to run all the tests
This commit is contained in:
55
wercker.yml
55
wercker.yml
@@ -6,11 +6,14 @@
|
|||||||
# If you want Google's container you would reference google/python
|
# If you want Google's container you would reference google/python
|
||||||
# Read more about containers on our dev center
|
# Read more about containers on our dev center
|
||||||
# http://devcenter.wercker.com/docs/containers/index.html
|
# http://devcenter.wercker.com/docs/containers/index.html
|
||||||
box: python:2.7
|
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:
|
||||||
# - postgres
|
- id: postgres
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: pyrigstesting
|
||||||
|
POSTGRES_USER: pyrigs
|
||||||
# http://devcenter.wercker.com/docs/services/postgresql.html
|
# http://devcenter.wercker.com/docs/services/postgresql.html
|
||||||
|
|
||||||
# - mongodb
|
# - mongodb
|
||||||
@@ -25,19 +28,32 @@ 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:
|
||||||
|
name: install firefox and other things
|
||||||
|
code: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get -y install firefox xvfb
|
||||||
|
|
||||||
|
- script:
|
||||||
|
name: Enable virtual display
|
||||||
|
code: |-
|
||||||
|
# Start xvfb which gives the context an virtual display
|
||||||
|
# which is required for tests that require an GUI
|
||||||
|
export DISPLAY=:99.0
|
||||||
|
start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -screen 0 1024x768x24 -ac +extension GLX +render -noreset
|
||||||
|
# Give xvfb time to start. 3 seconds is the default for all xvfb-run commands.
|
||||||
|
# sleep 3
|
||||||
|
|
||||||
# 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
|
||||||
# name: setup virtual environment
|
# name: setup virtual environment
|
||||||
# python_location: /usr/bin/python3.2
|
# python_location: /usr/bin/python3.2
|
||||||
|
|
||||||
# A step that executes `pip install` command.
|
|
||||||
- pip-install
|
|
||||||
|
|
||||||
# # This pip-install clears the local wheel cache
|
# # This pip-install clears the local wheel cache
|
||||||
# - pip-install:
|
# - pip-install:
|
||||||
# clean_wheel_dir: true
|
# clean_wheel_dir: true
|
||||||
@@ -49,3 +65,24 @@ build:
|
|||||||
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
|
||||||
|
- 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"
|
||||||
|
|
||||||
|
# A step that executes `pip install` command.
|
||||||
|
- pip-install
|
||||||
|
|
||||||
|
# Install coverage
|
||||||
|
- script:
|
||||||
|
name: install coverage
|
||||||
|
code: |
|
||||||
|
pip install coverage
|
||||||
|
|
||||||
|
# Run python tests
|
||||||
|
- script:
|
||||||
|
name: run tests with coverage
|
||||||
|
code: |
|
||||||
|
coverage run manage.py test RIGS
|
||||||
Reference in New Issue
Block a user