From bdf0794358a8e34a2232c11651eafed0a58fae93 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Mon, 12 Sep 2016 08:20:01 -0400 Subject: [PATCH 1/3] Add a tox.ini to run tests --- tox.ini | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tox.ini diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..5a1ba14b --- /dev/null +++ b/tox.ini @@ -0,0 +1,8 @@ +[tox] +envlist = py26,py27,pypy,py33,py34,py35, + +[testenv] +deps = + Cython +commands = + python setup.py test From a27099bb68d5f045999d61f04476114292ce6ea5 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Mon, 12 Sep 2016 08:21:24 -0400 Subject: [PATCH 2/3] Ignore common build/runtime artifacts --- .gitignore | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..9915308f --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# This file is generated by Cython +ext/_yaml.c + +# Tox and Build Artifacts +.tox/ +MANIFEST +build/ + +# Python runtime Artifacts +*.pyc From 2414cad1fc46f776d3f2e26f793e0898eaf5c6c5 Mon Sep 17 00:00:00 2001 From: Donald Stufft Date: Mon, 12 Sep 2016 08:28:09 -0400 Subject: [PATCH 3/3] Add Travis Support --- .travis.yml | 28 ++++++++++++++++++++++++++++ .travis/install.sh | 17 +++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 .travis.yml create mode 100755 .travis/install.sh diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..f1bd1014 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +language: python + +sudo: false + +cache: + directories: + - $HOME/.cache/pip + +matrix: + include: + - python: 2.6 + env: TOXENV=py26 + - python: 2.7 + env: TOXENV=py27 + - python: 3.3 + env: TOXENV=py33 + - python: 3.4 + env: TOXENV=py34 + - python: 3.5 + env: TOXENV=py35 + - python: pypy + env: TOXENV=pypy PYPY_VERSION=5.1 + +install: + - ./.travis/install.sh + +script: + - tox diff --git a/.travis/install.sh b/.travis/install.sh new file mode 100755 index 00000000..270c733a --- /dev/null +++ b/.travis/install.sh @@ -0,0 +1,17 @@ +# temporary pyenv installation to get latest pypy until the travis +# container infra is upgraded +if [[ "${TOXENV}" = pypy* ]]; then + git clone https://github.com/yyuu/pyenv.git ~/.pyenv + PYENV_ROOT="$HOME/.pyenv" + PATH="$PYENV_ROOT/bin:$PATH" + eval "$(pyenv init -)" + pyenv install "pypy-$PYPY_VERSION" + pyenv global "pypy-$PYPY_VERSION" + + pip install --upgrade tox + + pyenv rehash +fi + + +pip install --upgrade tox