forked from webpy/webpy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
38 lines (32 loc) · 1.18 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
os: linux
dist: xenial
language: python
python:
- 3.6
- 3.7
- 3.8
- 3.9
services:
- mysql
- postgresql
install:
- pip install codespell flake8 pytest-cov -r requirements.txt -r test_requirements.txt
before_script:
- if [ "$TRAVIS_PYTHON_VERSION" = "3.8" ]; then
pip install black ;
black --check . ;
fi
- codespell . --ignore-words-list=eith,gae --skip=./.* --quiet-level=2
- flake8 --count --ignore=E203,E265,E722,E731,W503 --max-line-length=477 --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