This repository was archived by the owner on Apr 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.travis.yml
More file actions
41 lines (31 loc) · 1.39 KB
/
.travis.yml
File metadata and controls
41 lines (31 loc) · 1.39 KB
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
# 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: python
sudo: false
env:
global:
- CONDA_INSTALL_LOCN="${HOME}/conda"
matrix:
- PYTHON=2.7
- PYTHON=3.6
install:
- mkdir -p ${HOME}/cache/pkgs
- "[ ! -f ${HOME}/cache/miniconda.sh ] && wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ${HOME}/cache/miniconda.sh || :"
- bash ${HOME}/cache/miniconda.sh -b -p ${CONDA_INSTALL_LOCN} && export PATH=${CONDA_INSTALL_LOCN}/bin:$PATH
# Re-use the pacakges 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
- git config --global user.name "Travis user"
- git config --global user.email travis-tests@example.com
# Now do the things we need to do to install it.
- conda install --file requirements.txt nose mock python=${PYTHON} --yes --quiet -c conda-forge
- conda list
- python setup.py install
script:
- nosetests conda_gitenv
# 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 {} \;