forked from webpy/webpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
32 lines (32 loc) · 1.37 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
language: python
python:
- 2.7
- 3.4
- 3.5
- 3.6
matrix:
allow_failures:
- python: 3.7
include:
- python: 3.7
dist: xenial # required for Python 3.7 (travis-ci/travis-ci#9069)
before_install:
- sudo mkdir -p /usr/include/postgresql/8.4/server
# - 'sudo apt-get -o Dpkg::Options::="--force-overwrite" install python-profiler'
install:
- pip install flake8 pytest-cov -r requirements.txt -r test_requirements.txt
before_script:
# stop the build if there are Python syntax errors or undefined names
# TODO: When we have an answer to webpy/webpy#482 we should remove the --exclude
- flake8 . --count --exclude=./web/webapi.py --select=E9,F63,F72,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- psql -c 'create database webpy;' -U postgres
- mysql --user=root -e "create user 'scott'@'localhost' identified by 'tiger'; create database webpy; grant all privileges on webpy.* to 'scott'@'localhost' with grant option;"
script: pytest --cov --cov-report=term-missing --cov-report=xml
after_success:
- |
flags=py${TRAVIS_PYTHON_VERSION//./}
bash <(curl -s https://codecov.io/bash) -Z -X gcov -X search -X xcode -X fix -X coveragepy -f coverage.xml -F "$flags"
notifications:
irc: irc.freenode.org#webpy