forked from websauna/websauna
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
51 lines (41 loc) · 1.64 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
language: python
addons:
postgresql: "9.4"
services:
- postgresql
- redis-server
matrix:
include:
- python: 3.4
env: PYTHON_VERSION=python3.4
- python: 3.5
env: PYTHON_VERSION=python3.5
# http://stackoverflow.com/a/19460794/315168
cache:
directories:
# /home/travis/.cache/pip/wheels is the normal pip cache folder
- $HOME/.cache/pip
# This is where we explicitly build binary compatible .whl archives for caching using create_wheelhouse.script
- wheelhouse
# https://docs.travis-ci.com/user/gui-and-headless-browsers/
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- psql -c 'create database websauna_test;' -U postgres
- pip install -U pip
script:
# https://pypi.python.org/pypi/coverage_enable_subprocess
- pip install coverage-enable-subprocess
- export COVERAGE_PROCESS_START=$PWD/.coveragerc
# http://stackoverflow.com/a/91394/315168
- if [ "$(ls wheelhouse/$PYTHON_VERSION/*)" ] ; then echo "Wheelhouse cache package count:" && (ls -l wheelhouse/$PYTHON_VERSION | wc -l) ; fi
- if [ ! "$(ls wheelhouse/$PYTHON_VERSION/*)" ] ; then echo "Rebuilding wheelhouse cache." ; bash websauna/tests/create_wheelhouse.bash ; fi
- pip install -q wheelhouse/$PYTHON_VERSION/*
- pip install -q -e ".[test]"
- py.test --splinter-webdriver=firefox --splinter-make-screenshot-on-failure=true --ini=travis.ini --timeout=200 --durations=10 --cov-report xml --cov websauna --cov-config .coveragerc websauna
# Show version pinnings when the build as still succeeding
after_script:
- pip freeze
# Update coverage information in codecov.io
after_success:
- codecov