From 0c7ac855f86ca980d9c5aeba83203ca6fb0ad4c9 Mon Sep 17 00:00:00 2001 From: HawkOwl Date: Mon, 7 Jul 2014 20:15:17 +0800 Subject: [PATCH] stealing the travis and tox from klein --- .travis.yml | 38 +++++++++++ tox.ini | 185 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 223 insertions(+) create mode 100644 .travis.yml create mode 100644 tox.ini diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 00000000..d31e5f83 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,38 @@ +language: python +python: 2.7 + +env: + - TOX_ENV=pyflakes + - TOX_ENV=docs + - TOX_ENV=py26 + - TOX_ENV=py27 + - TOX_ENV=pypy + - TOX_ENV=py26-twtrunk + - TOX_ENV=py27-twtrunk + - TOX_ENV=pypy-twtrunk + - TOX_ENV=py26-tw132 + - TOX_ENV=py27-tw132 + - TOX_ENV=pypy-tw132 + - TOX_ENV=py26-tw131 + - TOX_ENV=py27-tw131 + - TOX_ENV=pypy-tw131 + - TOX_ENV=py26-tw130 + - TOX_ENV=py27-tw130 + - TOX_ENV=pypy-tw130 + - TOX_ENV=py26-tw123 + - TOX_ENV=py27-tw123 + - TOX_ENV=pypy-tw123 + - TOX_ENV=py26-tw122 + - TOX_ENV=py27-tw122 + - TOX_ENV=pypy-tw122 + - TOX_ENV=py26-tw121 + - TOX_ENV=py27-tw121 + - TOX_ENV=pypy-tw121 + +install: + - ./.travis/install.sh + +script: tox -e $TOX_ENV + +notifications: + email: false diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..4c422d7d --- /dev/null +++ b/tox.ini @@ -0,0 +1,185 @@ +[tox] +envlist = + py26,py27,pypy, + py26-tw132,py27-tw132,pypy-tw132, + py26-tw131,py27-tw131,pypy-tw131, + py26-tw130,py27-tw130,pypy-tw130, + py26-tw123,py27-tw123,pypy-tw123, + py26-tw122,py27-tw122,pypy-tw122, + py26-tw121,py27-tw121,pypy-tw121, + pyflakes, docs, docs-linkcheck + +########################### +# Uses current Twisted +########################### + +[testenv:py26] +deps = + {[testenv]deps} + Twisted + +[testenv:py27] +deps = {[testenv:py26]deps} + +[testenv:pypy] +deps = {[testenv:py26]deps} + +########################### +# Uses trunk Twisted +########################### + +[testenv:py26-twtrunk] +basepython = python2.6 +deps = + {[testenv]deps} + git+git://github.com/twisted/twisted.git + +[testenv:py27-twtrunk] +basepython = python2.7 +deps = {[testenv:py26-twtrunk]deps} + +[testenv:pypy-twtrunk] +basepython = pypy +deps = {[testenv:py26-twtrunk]deps} + +########################### +# Uses Twisted 13.2 +########################### + +[testenv:py26-tw132] +basepython = python2.6 +deps = + {[testenv]deps} + Twisted==13.2 + +[testenv:py27-tw132] +basepython = python2.7 +deps = {[testenv:py26-tw132]deps} + +[testenv:pypy-tw132] +basepython = pypy +deps = {[testenv:py26-tw132]deps} + +########################### +# Uses Twisted 13.1 +########################### + +[testenv:py26-tw131] +basepython = python2.6 +deps = + {[testenv]deps} + Twisted==13.1 + +[testenv:py27-tw131] +basepython = python2.7 +deps = {[testenv:py26-tw131]deps} + +[testenv:pypy-tw131] +basepython = pypy +deps = {[testenv:py26-tw131]deps} + +########################### +# Uses Twisted 13.0 +########################### + +[testenv:py26-tw130] +basepython = python2.6 +deps = + {[testenv]deps} + Twisted==13.0 + +[testenv:py27-tw130] +basepython = python2.7 +deps = {[testenv:py26-tw130]deps} + +[testenv:pypy-tw130] +basepython = pypy +deps = {[testenv:py26-tw130]deps} + +########################### +# Uses Twisted 12.3 +########################### + +[testenv:py26-tw123] +basepython = python2.6 +deps = + {[testenv]deps} + Twisted==12.3 + +[testenv:py27-tw123] +basepython = python2.7 +deps = {[testenv:py26-tw123]deps} + +[testenv:pypy-tw123] +basepython = pypy +deps = {[testenv:py26-tw123]deps} + +########################### +# Uses Twisted 12.2 +########################### + +[testenv:py26-tw122] +basepython = python2.6 +deps = + {[testenv]deps} + Twisted==12.2 + +[testenv:py27-tw122] +basepython = python2.7 +deps = {[testenv:py26-tw122]deps} + +[testenv:pypy-tw122] +basepython = pypy +deps = {[testenv:py26-tw122]deps} + +########################### +# Uses Twisted 12.1 +########################### + +[testenv:py26-tw121] +basepython = python2.6 +deps = + {[testenv]deps} + Twisted==12.1 + +[testenv:py27-tw121] +basepython = python2.7 +deps = {[testenv:py26-tw121]deps} + +[testenv:pypy-tw121] +basepython = pypy +deps = {[testenv:py26-tw121]deps} + +########################### +# Run pyflakes +########################### + +[testenv:pyflakes] +deps = pyflakes +commands = pyflakes klein + +########################### +# Default testenv +########################### + +[testenv] +deps = mock +commands = + {envpython} --version + trial --version + trial klein + +[testenv:docs] +deps = + sphinx + sphinx_rtd_theme +basepython = python2.7 +commands = + sphinx-build -b html -d {envtmpdir}/doctrees docs docs/_build/html + +[testenv:docs-linkcheck] +deps = {[testenv:docs]deps} +basepython = python2.7 +commands = + sphinx-build -b html -d {envtmpdir}/doctrees docs docs/_build/html + sphinx-build -b linkcheck docs docs/_build/html \ No newline at end of file