language: python

addons:
  firefox: latest

# https://github.com/travis-ci/travis-ci/issues/9815#issuecomment-411073985
matrix:
  include:
    - python: 2.7
    - python: 3.4
    - python: 3.5
    - python: 3.6
    - python: 3.7
      dist: xenial
      sudo: true

cache: pip

env:
  global:
    - GECKODRIVER_VERSION=0.19.1
    - MOZ_HEADLESS=1
    - MOZ_CRASHREPORTER_SHUTDOWN=1

before_install:
  # Geckodriver
  - wget https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz
  - mkdir geckodriver
  - tar -xzf geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz -C geckodriver
  - export PATH=$PATH:$PWD/geckodriver

install: pip install tox-travis coverage codacy-coverage

script: tox

after_success:
  - coverage xml
  - python-codacy-coverage -r coverage.xml

after_failure:
  - cat geckodriver.log

language: python

addons:
  firefox: latest

# https://github.com/travis-ci/travis-ci/issues/9815#issuecomment-411073985
matrix:
  include:
    - python: 2.7
    - python: 3.4
    - python: 3.5
    - python: 3.6
    - python: 3.7
      dist: xenial
      sudo: true

cache: pip

env:
  global:
    - GECKODRIVER_VERSION=0.19.1
    - MOZ_HEADLESS=1
    - MOZ_CRASHREPORTER_SHUTDOWN=1
    - DISPLAY=:0

before_install:
  # Geckodriver
  - wget https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz
  - mkdir geckodriver
  - tar -xzf geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz -C geckodriver
  - export PATH=$PATH:$PWD/geckodriver

install: pip install tox-travis coverage codacy-coverage

script: tox

after_success:
  - coverage xml
  - python-codacy-coverage -r coverage.xml

after_failure:
  - cat geckodriver.log

Set display according to ... stackoverflow
Set display according to ... stackoverflow
