-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
48 lines (44 loc) · 1.28 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
language: python
cache: pip
matrix:
include:
- python: "3.6"
- python: "3.7"
- python: "3.8"
dist: xenial
sudo: required
# command to install dependencies
install: "pip install -r requirements.txt"
before_script:
- pip install flake8
- pip install black
- pip install pydocstyle
# stop the build if there are Python syntax errors or undefined names.
- flake8 copy2hash/ --count --max-line-length=88 --ignore=W293,W291,W503 --statistics
# stop the build if there are Python syntax follows not the black style.
- black copy2hash/ --check -v
# exit-zero treats all errors as warnings.
- flake8 . --count --exit-zero --max-complexity=10 --statistics
# stop if doc-string is broken in copy2hash.
- pydocstyle -e -s copy2bash/
# install copy2hash
- python setup.py install
# install pytest, coverage, and codecov for report
- pip install pytest
- pip install pytest-sugar
- pip install coverage
- pip install codecov
# command to run tests
script:
- coverage run -m pytest
# Generate test coverage report and upload to codecov.io
- coverage report -m
after_success:
- codecov
notifications:
slack:
on_success: always
on_failure: always
email:
on_success: always # default: change
on_failure: always # default: always