-
Notifications
You must be signed in to change notification settings - Fork 187
/
.travis.yml
34 lines (34 loc) · 1.2 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
dist: xenial
language: python
python:
- "3.7.9"
- "3.8"
- "3.9"
matrix:
fast_finish: true
include:
- name: "Code Style (Black/Flake8)"
install:
- pip install black
- pip install flake8
script:
# Black code style
- black --check --diff pytorch_widedeep tests examples setup.py
# Stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E901,E999,F821,F822,F823 --ignore=E266 --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 --ignore=E203,E266,E501,E722,F401,F403,F405,F811,W503,C901 --statistics
after_success: skip
install:
- pip install --upgrade pip
- pip install pytest-cov
- pip install codecov
- pip install .
script:
- pytest --doctest-modules pytorch_widedeep --cov-report html --cov-report term --disable-pytest-warnings --cov=pytorch_widedeep tests/
# - pytest tests
after_success:
# Combine coverage reports from Travis jobs
- coverage combine
# Send reports to Codecov. It automatically handles merging coverage results
- codecov