Skip to content
This repository has been archived by the owner on Sep 16, 2021. It is now read-only.

Commit

Permalink
Run tests using headless mode in Travis (currently only Nightly) (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
davehunt committed Aug 9, 2017
1 parent e6bf817 commit 3147188
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ _aliases:
packages:
- jwm
- &nightly
env: FIREFOX=nightly
env: FIREFOX=nightly MOZ_HEADLESS=1
addons:
<<: *apt
firefox: latest-nightly
before_script: skip
- &dev
env: FIREFOX=dev
addons:
Expand Down Expand Up @@ -71,9 +71,10 @@ jobs:
<<: *esr
- stage: deploy
python: 3.6
before_install: skip
install: skip
before_script: skip
script: skip
install: skip
deploy:
provider: pypi
user: davehunt
Expand All @@ -89,13 +90,14 @@ cache:
env:
global:
- DISPLAY=:99.0
install: pip install tox-travis
before_script:
before_install:
- wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.17.0/geckodriver-v0.17.0-linux64.tar.gz
- mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
- export PATH=$HOME/geckodriver:$PATH
- firefox --version
- geckodriver --version
install: pip install tox-travis
before_script:
- sh -e /etc/init.d/xvfb start
- sleep 10
- jwm &
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ envlist = py{27,36}, flake8, docs

[testenv]
recreate = True
passenv = DISPLAY TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
passenv = DISPLAY MOZ_HEADLESS TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
deps = -rrequirements/coverage.txt
commands =
pytest --driver=Firefox --cov --html=results/{envname}.html {posargs}
Expand Down

0 comments on commit 3147188

Please sign in to comment.