-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
43 lines (35 loc) · 825 Bytes
/
.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
language: python
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
# enable cache for Python dependencies
cache: pip
# restrict to branches
branches:
only:
- master
- develop
before_install:
# install poetry
- pip install poetry
# commands to install python dependencies
install:
# install dependencies for test
- poetry install --no-ansi
# commands to run tests
script:
# run tests
- poetry run pytest --cov-report term
# run static analysis
- if [[ $TRAVIS_PYTHON_VERSION != 3.6 ]]; then poetry run mypy .; fi
# run code formatting tests
- poetry run black . --check
- poetry run flake8
- poetry run isort . --check
# commands to manage tests results
after_script:
# upload coverage stats to codecov.io
# codecov token is stored in travis settings
- poetry run codecov -X gcov