-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path.travis.yml
62 lines (50 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
#python:
# - 2.7
# - 3.6
env:
# - TEST_TARGET=unit PYTHON_TARGET=2.7
- TEST_TARGET=unit PYTHON_TARGET=3.6
- TEST_TARGET=unit PYTHON_TARGET=3.7
# - TEST_TARGET=integration
install:
# Install miniconda
# -----------------
- if [[ $PYTHON_TARGET == 2* ]]; then
export CONDA_BASE=http://repo.continuum.io/miniconda/Miniconda2;
else
export CONDA_BASE=http://repo.continuum.io/miniconda/Miniconda3;
fi
- wget ${CONDA_BASE}-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
# Create the basic testing environment
# ------------------------------------
- conda config --set always_yes yes --set changeps1 no
- conda config --set show_channel_urls True
- conda update --quiet conda
- ENV_NAME='test-environment'
- conda create --quiet -n $ENV_NAME python=$PYTHON_TARGET
- source activate $ENV_NAME
# Customise the testing environment
# ---------------------------------
- conda install -c conda-forge --quiet --file conda_requirements.txt
- PREFIX=$HOME/miniconda/envs/$ENV_NAME
# Output debug info
- conda list
- conda info -a
# Install
- python setup.py --quiet install
script:
- if [[ $TEST_TARGET == 'unit' ]]; then
python setup.py test;
fi
# Get test data, then run the integration tests
- if [[ $TEST_TARGET == 'integration' ]] && [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
mkdir test_files;
wget http://gws-access.ceda.ac.uk/public/cis/cis_repo_test_files.tar.gz;
tar -xzvf cis_repo_test_files.tar.gz -C test_files;
export CIS_DATA_HOME="$(pwd)/test_files";
python setup.py test -i -p 0 -d;
fi