forked from pyro-ppl/pyro
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (85 loc) · 3.14 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
language: python
sudo: true
env:
global:
- PYTHONPATH=$PWD:$PYTHONPATH
cache:
directories:
- $HOME/.data
install:
- pip install -U pip
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then
pip install https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp27-cp27mu-linux_x86_64.whl;
else
pip install https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl;
fi
- pip install .[test]
- pip freeze
branches:
only:
- master
- dev
jobs:
fast_finish: true
include:
- stage: lint
python: 2.7
before_install: pip install flake8 nbstripout nbformat
install:
script:
- make lint
#- make scrub;
# git diff-index --quiet HEAD
- stage: auxiliary modules
python: 3.6
env: STAGE=docs
script:
- pip install -r docs/requirements.txt
- make docs
- make doctest
- stage: perf
python: 2.7
env: STAGE=perf
script:
- pip install -e .[profile]
- pytest -vs --benchmark-disable tests/perf/test_benchmark.py
- stage: profiler
python: 2.7
env: STAGE=profiler
script:
- pip install -e .[profile]
- python -m profiler.distributions
- stage: unit test
python: 2.7
env: STAGE=unit
script: pytest -vs --cov=pyro --cov-config .coveragerc --stage unit --durations 20
- python: 2.7
env: STAGE=examples
script:
- CI=1 pytest -vs --cov=pyro --cov-config .coveragerc --stage test_examples --durations 10
- grep -l smoke_test tutorial/source/*.ipynb | xargs grep -L 'smoke_test = False' \
| CI=1 xargs pytest -vx --nbval-lax --current-env
- python: 3.6
env: STAGE=unit
script: pytest -vs --cov=pyro --cov-config .coveragerc --stage unit --durations 20
- python: 3.6
env: STAGE=examples
script:
- CI=1 pytest -vs --cov=pyro --cov-config .coveragerc --stage test_examples --durations 10
- grep -l smoke_test tutorial/source/*.ipynb | xargs grep -L 'smoke_test = False' \
| CI=1 xargs pytest -vx --nbval-lax --current-env
- stage: integration test
python: 2.7
env: STAGE=integration_batch_1
script: pytest -vs --cov=pyro --cov-config .coveragerc --stage integration_batch_1 --durations 10
- python: 2.7
env: STAGE=integration_batch_2
script: pytest -vs --cov=pyro --cov-config .coveragerc --stage integration_batch_2 --durations 10
- python: 3.6
env: STAGE=integration_batch_1
script: pytest -vs --cov=pyro --cov-config .coveragerc --stage integration_batch_1 --durations 10
- python: 3.6
env: STAGE=integration_batch_2
script: pytest -vs --cov=pyro --cov-config .coveragerc --stage integration_batch_2 --durations 10
after_success:
- bash <(curl -s https://codecov.io/bash)