-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
50 lines (43 loc) · 1.28 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
language: python
#sudo: false
# choose python versions
python:
- "3.6"
- "3.7"
- "2.7"
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
- conda install -c conda-forge --quiet pytest
- PREFIX=$HOME/miniconda/envs/$ENV_NAME
# Output debug info
- conda list
- conda info -a
# Install
#- python setup.py --quiet install
- pip install .
# to check if package has been installed
- conda list
# command to run tests
#script
script:
- pytest