Skip to content

Instantly share code, notes, and snippets.

@omaciel
Created October 26, 2017 16:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save omaciel/d15ff13d191711a400a24917ca332bfb to your computer and use it in GitHub Desktop.
Save omaciel/d15ff13d191711a400a24917ca332bfb to your computer and use it in GitHub Desktop.
Example for using Google Chrome via Travis for UI testing
language: python
python:
- 3.5
services:
- postgresql
addons:
postgresql: '9.4'
chrome: stable
before_install:
- wget https://chromedriver.storage.googleapis.com/2.33/chromedriver_linux64.zip
- mkdir chromedriver
- unzip chromedriver_linux64.zip -d chromedriver
- export PATH=$PATH:$PWD/chromedriver
install:
- pip install -r requirements/tests.txt
- pip install coveralls pyyaml
- gem install coveralls-lcov
- nvm install 6.3.1
- nvm use 6.3.1
- npm --prefix frontend install
script:
- flake8
- pytest --driver Chrome --create-db --cov mad
- isort --recursive --check-only --diff mad
- npm --prefix frontend run lint
- npm --prefix frontend test -- --coverage
after_success:
- coveralls-lcov -v -n frontend/coverage/lcov.info > coverage_js.json
- coveralls --merge=coverage_js.json
sudo: false
cache:
pip: true
directories:
- frontend/node_modules
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment