From 2c1906c5948e3dade4daef62cb42bf8495f303ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20HUBSCHER?= Date: Fri, 25 Sep 2015 11:48:32 +0200 Subject: [PATCH] Add tox and travis-ci matrix --- .gitignore | 6 ++++++ .travis.yml | 9 +++++++++ Makefile | 11 ++++++----- sops/__init__.py | 0 tox.ini | 14 ++++++++++++++ 5 files changed, 35 insertions(+), 5 deletions(-) create mode 100644 .gitignore create mode 100644 .travis.yml mode change 100755 => 100644 sops/__init__.py create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..0af01fc7e --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +*.pyc +.cache/ +__pycache__/ +*.egg-info/ +*.egg +.tox/ diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..8c166ab12 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,9 @@ +language: python +python: 2.7 +env: + - TOX_ENV=py26 + - TOX_ENV=py27 + - TOX_ENV=py34 + - TOX_ENV=flake8 +install: pip install tox +script: tox -e $TOX_ENV diff --git a/Makefile b/Makefile index fffd5e4be..295e97d44 100644 --- a/Makefile +++ b/Makefile @@ -10,15 +10,16 @@ requirements: dev-requirements: sudo pip install -U -r dev-requirements.txt -tests: +tests: install dev-requirements py.test tests + test: tests pypi: python setup.py sdist check upload --sign clean: - rm -rf *pyc - rm -rf build - rm -rf __pycache__ - rm -rf dist + rm -rf *.pyc sops/*.pyc + rm -rf __pycache__ sops/__pycache__ + rm -rf build/ dist/ + rm -fr .tox/ diff --git a/sops/__init__.py b/sops/__init__.py old mode 100755 new mode 100644 diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..a12664a29 --- /dev/null +++ b/tox.ini @@ -0,0 +1,14 @@ +[tox] +envlist = py26,py27,py34,flake8 + +[testenv] +commands = + python --version + py.test tests/ {posargs} +deps = -rdev-requirements.txt +install_command = pip install --pre {opts} {packages} + +[testenv:flake8] +commands = flake8 sops +deps = + flake8