Skip to content

Commit 21b49a3

Browse files
committed
Add conda and torchvision to .travis.yml
1 parent 84667e1 commit 21b49a3

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.travis.yml

+15-2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,19 @@ python:
88
- "3.5"
99
- "3.6"
1010
# command to install dependencies
11-
install: "pip install -r requirements.txt"
11+
install:
12+
# Install conda.
13+
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
14+
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
15+
else
16+
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
17+
fi
18+
- bash miniconda.sh -b -p $HOME/miniconda
19+
- export OPATH="$PATH" && export PATH="$HOME/miniconda/bin:$PATH"
20+
- conda create -q -y -n test-environment python=$TRAVIS_PYTHON_VERSION pytest
21+
- source activate test-environment
22+
# Attempt to install torchvision; on failure, revert back to pre-conda environment.
23+
- conda install -q -y torchvision -c soumith || export PATH="$OPATH"
24+
- pip install -r requirements.txt
1225
# command to run tests
13-
script: py.test -v
26+
script: py.test -v

0 commit comments

Comments
 (0)