forked from pysat/pysat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
82 lines (78 loc) · 2.48 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
language: python
python:
- "2.7"
- "3.6"
sudo: false
cache: pip
cache:
directories:
- ../pyglow
addons:
apt:
packages:
- gfortran
- libncurses5-dev
# Setup anaconda
before_install:
#- apt-get update
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- 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 --yes conda
# Useful for debugging any issues with conda
- conda info -a
- conda create -q -n test-environment python=$TRAVIS_PYTHON_VERSION atlas numpy scipy matplotlib nose pandas statsmodels coverage netCDF4 ipython
# command to install dependencies
install:
# Coverage packages are on my binstar channel
# - conda install --yes -c dan_blanchard python-coveralls nose-cov
- source activate test-environment
- pip install coveralls
- pip install pysatCDF >/dev/null
# install pyglow, space science models
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
travis_wait 30 pip install ipdb --user;
cd ..;
fi
- pwd
- ls
# check if there is a partial download of pyglow, remove if true
- export PYGLOW_DIR=./pyglow
- if [[ -d "$PYGLOW_DIR" && "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
export PYGLOW_SIZE=($(du -s $PYGLOW_DIR));
echo 'PYGLOW_SIZE' $PYGLOW_SIZE;
export CHECK_SIZE=50000;
if [[ "${PYGLOW_SIZE}" -lt "$CHECK_SIZE" ]]; then
rm -r $PYGLOW_DIR;
echo 'removing pyglow directory';
fi
fi
# If pyglow exists, install it
- if [[ -d "$PYGLOW_DIR" && -e "$PYGLOW_DIR/setup.py" && "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
cd $PYGLOW_DIR;
python setup.py install;
cd ..;
fi
# If no pyglow, clone, then run script
- if [[ ! -d "$PYGLOW_DIR" || ! -e "$PYGLOW_DIR/setup.py" && "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
travis_wait 40 git clone https://github.com/timduly4/pyglow.git;
cd $PYGLOW_DIR;
travis_wait 40 ./pyglow_install.sh >/dev/null;
cd ..;
fi
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
cd pysat;
fi
# install pysat
- "python setup.py install"
# command to run tests
script:
- nosetests -vs --with-coverage --cover-package=pysat
after_success:
coveralls