forked from conda-forge/conda-smithy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
43 lines (34 loc) · 1.43 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
# The language in this case has no bearing - we are going to be making use of conda for a
# python distribution for the scientific python stack.
language: generic
sudo: false
env:
global:
- CONDA_INSTALL_LOCN="${HOME}/conda"
matrix:
- PYTHON=2.7
- PYTHON=3.5
install:
- mkdir -p ${HOME}/cache/pkgs
- "[ ! -f ${HOME}/cache/miniconda.sh ] && wget https://repo.continuum.io/miniconda/Miniconda3-4.2.12-Linux-x86_64.sh -O ${HOME}/cache/miniconda.sh || :"
- bash ${HOME}/cache/miniconda.sh -b -p ${CONDA_INSTALL_LOCN}
- source ${CONDA_INSTALL_LOCN}/bin/activate root
- conda update --yes --quiet conda
# Re-use the packages in the cache, and download any new ones into that location.
- rm -rf ${CONDA_INSTALL_LOCN}/pkgs && ln -s ${HOME}/cache/pkgs ${CONDA_INSTALL_LOCN}/pkgs
# Now do the things we need to do to install it.
- conda install --file requirements.txt coverage python-coveralls mock python=${PYTHON} ${CONDA_PKGS} --yes --quiet -c conda-forge
- python setup.py install
script:
- coverage erase
- coverage run -m unittest discover
- coverage report
after_success:
- coveralls
# We store the files that are downloaded from continuum.io, but not the environments that are created.
cache:
directories:
- $HOME/cache
before_cache:
# Remove all untarred directories.
- find $CONDA_INSTALL_LOCN/pkgs/ -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;