-
Notifications
You must be signed in to change notification settings - Fork 34
/
.travis.yml
46 lines (46 loc) · 1.09 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
dist: xenial
language: python
stages:
- "Static code analysis"
- test
- deploy
python:
- "3.5"
- "3.6"
- "3.7"
notifications:
email: false
install:
- pip install --upgrade pip
- pip install poetry
- poetry install
script:
# run tests, and get coverage:
- poetry run python -m pytest --cov=src/
# test that the notebooks all run smoothly
# - find docs -name '*.ipynb' -o -name 'examples/*.ipynb' | xargs poetry run jupyter nbconvert --to notebook --execute
# submit coverage report to coveralls
- poetry run coveralls
jobs:
include:
- stage: "Static code analysis"
name: "black formatting test"
script:
- black --check src/
python: "3.7"
install:
- pip install -qq black
- stage: "Static code analysis"
name: "flake8 check"
script:
- flake8 src/
python: "3.7"
install:
- pip install -qq flake8
- stage: deploy
name: "Deploy to pypi"
if: tag IS present
script:
- poetry build
- poetry publish --username $PYPI_USER --password $PYPI_PASSWORD
python: "3.7"