-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
63 lines (52 loc) · 1.53 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
os:
- linux
# - osx
# - windows
# choose python versions
python:
- "3.6"
- "3.7"
# - "2.7"
install:
# Install miniconda
# -----------------
- PYTHON_TARGET=$TRAVIS_PYTHON_VERSION
- echo $PYTHON_TARGET
- if [[ $PYTHON_TARGET == 3* ]]; then
export CONDA_BASE=http://repo.continuum.io/miniconda/Miniconda3;
fi
- echo $CONDA_BASE
- 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
# ---------------------------------
#install requirements from conda-forge based on conda-requirements.txt:
- conda install -c conda-forge --quiet --file conda_requirements.txt
#install pytest:
- conda install -c conda-forge --quiet pytest
# install packages directly from github:
- pip install git+https://github.com/mheikenfeld/piecharts.git
- pip install git+https://github.com/mheikenfeld/mpdiag.git
- PREFIX=$HOME/miniconda/envs/$ENV_NAME
# Output debug info
- conda list
- conda info -a
# Install
- pip install .
# Output debug info
- conda list
# command to run tests
#script
script:
- pytest