Skip to content

Commit

Permalink
Set up Travis CI and tox
Browse files Browse the repository at this point in the history
  • Loading branch information
eliangcs committed Apr 28, 2016
1 parent 574f431 commit 42526f4
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 22 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "3.4"
- "3.5"
- "pypy"
- "pypy3"

install:
- pip install -r requirements.txt
- pip install -r requirements-test.txt

script:
- py.test
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include README.rst LICENSE requirements.txt requirements-test.txt
9 changes: 6 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HTTP Prompt
===========
HTTP Prompt (A WORK IN PROGRESS)
==============================

**WORK IN PROGRESS**
|Build Status|

An interactive command-line HTTP client featuring auto-completion and syntax
highlighting.
Expand Down Expand Up @@ -46,3 +46,6 @@ Use case::
"url": "http://httpbin.org/post?sex=M"
}


.. |Build Status| image:: https://api.travis-ci.org/eliangcs/http-prompt.svg?branch=master
:target: https://travis-ci.org/eliangcs/http-prompt
2 changes: 2 additions & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
pytest
pytest-cov
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
click>=5.0
httpie>=0.9.0
parsimonious>=0.6.2
prompt-toolkit>=0.60
Pygments>=2.1.0
26 changes: 9 additions & 17 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,14 @@ def read_description(filename):
return f.read()


requirements = [
# TODO
'click>=5.0',
'httpie>=0.9.0',
'parsimonious>=0.6.2',
'prompt-toolkit>=0.60',
'Pygments>=2.1.0',
]
def read_requirements(filename):
try:
with open(filename) as f:
return f.read().splitlines()
except IOError:
import os
raise IOError(os.getcwd())

test_requirements = [
# TODO
'pytest',
'pytest-cov',
]

setup(
name='http-prompt',
Expand All @@ -63,7 +57,7 @@ def read_description(filename):
[console_scripts]
http-prompt=http_prompt.cli:cli
""",
install_requires=requirements,
install_requires=read_requirements('requirements.txt'),
classifiers=[
'Development Status :: 2 - Pre-Alpha',
'Intended Audience :: Developers',
Expand All @@ -77,7 +71,5 @@ def read_description(filename):
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5'
],
test_suites='tests',
test_requires=test_requirements
]
)
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@
# and then run "tox" from this directory.

[tox]
envlist = py26, py27, py33, py34, py35, pypy
envlist = py26, py27, py33, py34, py35, pypy, pypy3

[testenv]
commands = py.test
deps =
pytest
-rrequirements-test.txt

[pytest]
testpaths = tests
addopts = --cov-report term-missing --cov http_prompt

0 comments on commit 42526f4

Please sign in to comment.