Skip to content

Commit 7ab53c3

Browse files
committed
Added testing and Travis.
1 parent d652fea commit 7ab53c3

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.travis.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# The language in this case has no bearing - we are going to be making use of conda for a
2+
# python distribution for the scientific python stack.
3+
language: python
4+
5+
sudo: false
6+
7+
env:
8+
global:
9+
- CONDA_INSTALL_LOCN="${HOME}/conda"
10+
matrix:
11+
- PYTHON=2.7
12+
- PYTHON=3.5
13+
14+
install:
15+
- mkdir -p ${HOME}/cache/pkgs
16+
- "[ ! -f ${HOME}/cache/miniconda.sh ] && wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ${HOME}/cache/miniconda.sh || :"
17+
- bash ${HOME}/cache/miniconda.sh -b -p ${CONDA_INSTALL_LOCN} && export PATH=${CONDA_INSTALL_LOCN}/bin:$PATH
18+
19+
# Re-use the pacakges in the cache, and download any new ones into that location.
20+
- rm -rf ${CONDA_INSTALL_LOCN}/pkgs && ln -s ${HOME}/cache/pkgs ${CONDA_INSTALL_LOCN}/pkgs
21+
22+
# Now do the things we need to do to install it.
23+
- conda create -n test_env --file requirements.txt nose mock python=${PYTHON} ${EXTRA_DEPS} --yes --quiet
24+
- source activate test_env
25+
- python setup.py install
26+
- mkdir not_the_source_root && cd not_the_source_root
27+
28+
script:
29+
- nosetests stratify
30+
31+
32+
# We store the files that are downloaded from continuum.io, but not the environments that are created.
33+
cache:
34+
directories:
35+
- $HOME/cache
36+
before_cache:
37+
# Remove all untarred directories.
38+
- find $CONDA_INSTALL_LOCN/pkgs/ -mindepth 1 -maxdepth 1 -type d -exec rm -r {} \;

requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
cython
2+
numpy

0 commit comments

Comments
 (0)