Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test using tox conda #25

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 27 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,37 @@
# Applied from https://github.com/conda/conda/blob/master/docs/source/user-guide/tasks/use-conda-with-travis-ci.rst

language: python

# We don't actually use the Travis Python, but this keeps it organized.
# But tox runs in Travis Python, so it has to be compatible with tox and its plugins.
matrix:
include:
- name: "Python: 2.7"
python: 3.7
env: TOXENV=py27
python:
- "2.7"
- "3.5"
- "3.6"
- "3.7"

before_install:
- sudo apt-get install -y npm

install:
- sudo apt-get update
# We do this conditionally because it saves us some downloading if the
# version is the same.
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- source "$HOME/miniconda/etc/profile.d/conda.sh"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
- conda info -a

# Replace dep1 dep2 ... with your dependencies
# wavedrompy will use tox-conda, so all dependencies will be handled in tox.ini
- conda create -q -c conda-forge -n test-environment python=$TRAVIS_PYTHON_VERSION tox-conda
- conda activate test-environment

- pip install tox-travis

script:
Expand Down
6 changes: 5 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
envlist = py27, py35, py36, py37

[testenv]
deps = pytest
conda_channels = conda-forge
conda_deps =
nodejs
git
pytest
extras = test

commands =
Expand Down