Skip to content

Instantly share code, notes, and snippets.

@flenter
Created March 9, 2016 16:15
Show Gist options
  • Save flenter/8c5ceb8f54e1691faf52 to your computer and use it in GitHub Desktop.
Save flenter/8c5ceb8f54e1691faf52 to your computer and use it in GitHub Desktop.
xvfb with wercker.yml
# box:...
# services:
# - ...
build:
steps:
- install-packages:
packages: xvfb firefox
- 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
- script:
name: run tests
code: |-
python manage.py test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment