forked from pytorch/ignite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
43 lines (39 loc) · 1.33 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
language: python
python:
- "2.7"
- "3.5"
install:
- sudo apt-get update
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a
- conda create -q -n test-environment -c pytorch python=$TRAVIS_PYTHON_VERSION numpy mock pytorch
- if [[ $TRAVIS_PYTHON_VERSION == 2.7 ]]; then pip install enum34; fi
- source activate test-environment
- python setup.py install
- pip install --upgrade pytest
- pip install visdom torchvision tensorboardX
script:
- pytest tests/
# Smoke tests for the examples
# mnist.py
- python examples/mnist.py --epochs=1
# mnist_with_visdom.py
- python -c "from visdom.server import download_scripts; download_scripts()" # download scripts : https://github.com/facebookresearch/visdom/blob/master/py/server.py#L929
- python -m visdom.server &
- sleep 10
- python examples/mnist_with_visdom.py --epochs=1
- kill %1
# mnist_with_tensorboardx.py
- python examples/mnist_with_tensorboardx.py --epochs=1
matrix:
include:
- env: LINT_CHECK
python: "2.7"
install: pip install flake8
script: flake8