summaryrefslogtreecommitdiffstats
path: root/.travis
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.travis.yml30
-rwxr-xr-x.travis/install.sh25
2 files changed, 55 insertions, 0 deletions
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..41d3b3a
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,30 @@
+sudo: false
+language: python
+cache: pip
+install: ./.travis/install.sh
+script:
+ - source ~/.venv/bin/activate
+ - tox
+ - if [[ "$TOXENV" == "py37" ]]; then black --check cli_helpers tests ; else echo "Skipping black for $TOXENV"; fi
+matrix:
+ include:
+ - os: linux
+ python: 3.6
+ env: TOXENV=py36
+ - os: linux
+ python: 3.6
+ env: TOXENV=noextras
+ - os: linux
+ python: 3.6
+ env: TOXENV=docs
+ - os: linux
+ python: 3.6
+ env: TOXENV=packaging
+ - os: osx
+ language: generic
+ env: TOXENV=py36
+ - os: linux
+ python: 3.7
+ env: TOXENV=py37
+ dist: xenial
+ sudo: true
diff --git a/.travis/install.sh b/.travis/install.sh
new file mode 100755
index 0000000..1768c89
--- /dev/null
+++ b/.travis/install.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -ex
+
+if [[ "$(uname -s)" == 'Darwin' ]]; then
+ sw_vers
+
+ git clone --depth 1 https://github.com/pyenv/pyenv ~/.pyenv
+ export PYENV_ROOT="$HOME/.pyenv"
+ export PATH="$PYENV_ROOT/bin:$PATH"
+ eval "$(pyenv init --path)"
+
+ case "${TOXENV}" in
+ py36)
+ pyenv install 3.6.1
+ pyenv global 3.6.1
+ ;;
+ esac
+ pyenv rehash
+fi
+
+pip install virtualenv
+python -m virtualenv ~/.venv
+source ~/.venv/bin/activate
+pip install -r requirements-dev.txt -U --upgrade-strategy only-if-needed