forked from websauna/websauna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
90 lines (76 loc) · 2.43 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
language: python
dist: trusty
addons:
postgresql: "9.4"
chrome: stable
services:
- postgresql
- redis-server
env: # Without this, allow_failures will not work
matrix:
fast_finish: true
include:
- python: 3.5
env:
- PYTHON_VERSION=python3.5
- TOXENV=py35
- python: 3.6
env:
- PYTHON_VERSION=python3.6
- TOXENV=py36
- python: 3.7
env:
- PYTHON_VERSION=python3.7
- TOXENV=py37
dist: xenial
sudo: true
- python: 3.8-dev
env:
- PYTHON_VERSION=python3.8
- TOXENV=py38
dist: xenial
sudo: true
- python: 3.6
env:
- PYTHON_VERSION=python3.6
- TOXENV=style
allow_failures:
- python: 3.8-dev
env:
- PYTHON_VERSION=python3.8
- TOXENV=py38
# http://stackoverflow.com/a/19460794/315168
cache:
directories:
# /home/travis/.cache/pip/wheels is the normal pip cache folder
- $HOME/.cache/pip
#- .tox
install:
- travis_retry pip install tox
# http://stackoverflow.com/questions/39279651/connection-refused-when-running-selenium-tests-in-marionette
# - npm install -g geckodriver
# https://docs.travis-ci.com/user/gui-and-headless-browsers/
before_script:
- psql -c 'create database websauna_test;' -U postgres
- pip install -U pip
# Install chromedriver - https://sites.google.com/a/chromium.org/chromedriver/
# This is not provided by Travis, but is needed by Selenium
- wget -N http://chromedriver.storage.googleapis.com/2.36/chromedriver_linux64.zip
- unzip chromedriver_linux64.zip
- chmod +x chromedriver
- sudo mv chromedriver /usr/bin
# Make chrome available as "chrome"
- sudo ln -s /usr/bin/google-chrome-stable /usr/bin/chrome
- echo "Using chrome version $(chrome --version) from $(which chrome)"
- echo "Using chromedriver version $(chromedriver --version) from $(which chromedriver)"
script:
# https://pypi.python.org/pypi/coverage_enable_subprocess
- pip install coverage-enable-subprocess
- export COVERAGE_PROCESS_START=$PWD/.coveragerc
# This env variable is passed to scaffold tests that test the tests themselves
- export SPLINTER_WEBDRIVER=chrome
- export TRAVIS=true
- tox -- --ini=websauna/conf/travis.ini --splinter-webdriver=chrome --splinter-headless=true --debug
after_success:
- .tox/$TOXENV/bin/codecov
- .tox/$TOXENV/bin/pip freeze