Skip to content
This repository was archived by the owner on Sep 24, 2021. It is now read-only.

Commit bd4b8b0

Browse files
committed
better matrix and build docs
1 parent f60bfa9 commit bd4b8b0

File tree

1 file changed

+34
-14
lines changed

1 file changed

+34
-14
lines changed

.travis.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,45 @@
11
language: python
22

3+
sudo: false
34

4-
env:
5-
- CONDA="python=2.7"
6-
- CONDA="python=3.4"
7-
- CONDA="python=3.5"
8-
- CONDA="python=3.6"
5+
addons:
6+
apt:
7+
packages: octave
8+
9+
matrix:
10+
fast_finish: true
11+
include:
12+
- python: 2.7
13+
env: NUMPY=1.11
14+
- python: 2.7
15+
env: NUMPY=1.12
16+
- python: 3.6
17+
env: NUMPY=1.11
18+
- python: 3.6
19+
env: NUMPY=1.12
20+
- python: 3.6
21+
env: TEST_TARGET=publish
922

1023
before_install:
11-
- sudo apt-add-repository -y ppa:picaso/octave
12-
- sudo apt-get update -qq
13-
- sudo apt-get install -qq octave liboctave-dev
1424
- wget http://bit.ly/miniconda -O miniconda.sh
1525
- bash miniconda.sh -b -p $HOME/miniconda
1626
- export PATH="$HOME/miniconda/bin:$PATH"
17-
- conda update --yes conda
18-
# Install numpy and scipy with conda for faster tests.
19-
- travis_retry conda create --yes -n test $CONDA pip numpy scipy
20-
- source activate test
21-
- travis_retry pip install -r requirements-dev.txt
22-
- conda info -a
27+
- conda update --yes --all
28+
- conda config --add channels conda-forge --force
29+
- conda create --yes -n TEST python=$TRAVIS_PYTHON_VERSION --file requirements-dev.txt
30+
- source activate TEST
31+
- conda install --yes $NUMPY
32+
- if [[ "$TRAVIS_PYTHON_VERSION" == "3.6" ]]; then
33+
conda install --yes doctr ;
34+
fi
35+
36+
# Test source distribution.
37+
install:
38+
- python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install gsw-${version}.tar.gz && popd
2339

2440
script:
2541
- python setup.py test
42+
- if [[ $TEST_TARGET == "publish" ]]; then
43+
pushd docs && make html && popd
44+
doctr deploy --built-docs=docs/_build/html --gh-pages-docs=. ;
45+
fi

0 commit comments

Comments
 (0)