From 9e8b00ea1123ab801e41b3ec8f7fa3ef84f6bdbe Mon Sep 17 00:00:00 2001 From: Ori Hoch Date: Tue, 23 Oct 2018 00:54:57 +0300 Subject: [PATCH 1/2] Support for running make test using conda --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f2d9f39..42068e1 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,8 @@ .DEFAULT_GOAL := test check_prereqs: - bash -c '[[ -n $$VIRTUAL_ENV ]]' - bash -c '[[ $$(python3 --version) == *3.4.3* ]]' + bash -c '[[ -n $${VIRTUAL_ENV:-$${CONDA_PREFIX}} ]]' + bash -c '[[ $$(python3 --version 2>&1) == *3.4.3* ]]' install: check_prereqs python3 -m pip install -e '.[dev]' From 74b2e5371317d76aec74dcac48c821969845244d Mon Sep 17 00:00:00 2001 From: Ori Hoch Date: Tue, 23 Oct 2018 00:55:19 +0300 Subject: [PATCH 2/2] test multiple python versions using travis and conda --- .travis.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..1945468 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +language: + python +env: + matrix: + - PYTHON_VERSION="3.4" + - PYTHON_VERSION="3.4.3" + - PYTHON_VERSION="3.5" + - PYTHON_VERSION="3.5.2" + - PYTHON_VERSION="3.6" + - PYTHON_VERSION="3.7" +install: + - sudo apt-get update + - wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh + - bash miniconda.sh -b -p $HOME/miniconda + - export PATH="$HOME/miniconda/bin:$PATH" + - hash -r + - conda config --set always_yes yes --set changeps1 no + - conda update -q conda + - conda info -a + - conda create -q -n test-environment python=$PYTHON_VERSION nose + - source activate test-environment + - python3 -m pip install . +script: + - nosetests -v