-
Notifications
You must be signed in to change notification settings - Fork 12
/
.travis.yml
executable file
·62 lines (54 loc) · 1.69 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
language: python
sudo: false
dist: trusty
cache:
directories:
- $HOME/miniconda
# Removing the directory will remove the env but leave the cached packages
# at $HOME/miniconda/pkgs. That is a win-win because when re-creating the
# env we will download only the new packages.
before_cache:
- rm -rf $HOME/miniconda/envs/TEST
matrix:
fast_finish: true
include:
- python: 2.7
env: TEST_TARGET=default
- python: 3.6
env: TEST_TARGET=default
- python: 3.6
env: TEST_TARGET=coding_standards
allow_failures:
- python: 3.6
env: TEST_TARGET=default
- python: 3.6
env: TEST_TARGET=coding_standards
before_install:
- |
URL="http://bit.ly/miniconda"
echo ""
if [ ! -f $HOME/miniconda/bin/conda ] ; then
echo "Fresh miniconda installation."
wget $URL -O miniconda.sh
rm -rf $HOME/miniconda
bash miniconda.sh -b -p $HOME/miniconda
fi
- export PATH="$HOME/miniconda/bin:$PATH"
- conda update conda --yes
- conda config --set show_channel_urls true
- conda config --add channels conda-forge --force
- conda create --yes -n TEST python=$TRAVIS_PYTHON_VERSION --file requirements.txt --file requirements-dev.txt
- source activate TEST
# These have different names from PyPI.
- conda install --yes python-wget basemap-data-hires
- conda install --yes landlab -c conda-forge
# Test source distribution.
install:
- python setup.py sdist && version=$(python setup.py --version) && pushd dist && pip install ogh-${version}.tar.gz && popd
script:
- if [[ $TEST_TARGET == 'default' ]]; then
pytest -vv ogh/tests/test_ogh.py ;
fi
- if [[ $TEST_TARGET == 'coding_standards' ]]; then
flake8 --max-line-length=105 ogh;
fi