Skip to content

Commit a2a6125

Browse files
committed
Set up Travis build
1 parent e2964ed commit a2a6125

4 files changed

Lines changed: 42 additions & 3 deletions

File tree

.travis.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
language: python
2+
python:
3+
- "2.6"
4+
- "2.7"
5+
- "3.3"
6+
- "3.4"
7+
- "pypy"
8+
matrix:
9+
allow_failures:
10+
- python: "2.6"
11+
- python: "3.3"
12+
- python: "3.4"
13+
- python: "pypy"
14+
fast_finish: true
15+
install:
16+
- pip install -r requirements-dev.txt
17+
script:
18+
- make flake8

Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
.PHONY: all virtualenv
2+
MAX_LINE_LENGTH=110
3+
4+
virtualenv: ./env/requirements.built
5+
6+
env:
7+
virtualenv env
8+
9+
./env/requirements.built: env requirements-dev.txt
10+
./env/bin/pip install -r requirements-dev.txt
11+
cp requirements-dev.txt ./env/requirements.built
12+
13+
flake8:
14+
flake8 --max-line-length=$(MAX_LINE_LENGTH) *.py
15+
16+
test:
17+
nosetests -v
18+
19+
autopep8:
20+
autopep8 --max-line-length=$(MAX_LINE_LENGTH) -i *.py

requirements-dev.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
autopep8
2+
flake8
3+
flake8-blind-except
4+
nose

zunittest.py renamed to test_zeroconf.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,3 @@ class Framework(unittest.TestCase):
119119
def testLaunchAndClose(self):
120120
rv = r.Zeroconf()
121121
rv.close()
122-
123-
if __name__ == '__main__':
124-
unittest.main()

0 commit comments

Comments
 (0)