Skip to content

Commit c143836

Browse files
committed
tox all the things
1 parent e8f38dc commit c143836

File tree

9 files changed

+103
-139
lines changed

9 files changed

+103
-139
lines changed

Diff for: .codecov.yml

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
comment: off

Diff for: .coveragerc

-17
This file was deleted.

Diff for: .travis.yml

+49-26
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,62 @@
1-
language: python
1+
dist: trusty
22
sudo: false
3-
python:
4-
- "2.7"
5-
- "3.5"
6-
- "3.6"
3+
language: python
74

85
branches:
96
only:
107
- master
8+
- /^\d+\.\d+\.X$/
9+
10+
cache: pip
1111

1212
env:
13-
- MODE=pytest
14-
- MODE=autobahn
15-
SIDE=client
16-
- MODE=autobahn
17-
SIDE=server
13+
global:
14+
- CI_DEPS=codecov>=2.0.5
15+
- CI_COMMANDS=codecov
1816

1917
matrix:
2018
include:
21-
- python: 2.7
22-
env: MODE=pytest WSACCEL=0
23-
- python: 3.6
24-
env: MODE=pytest WSACCEL=0
25-
- os: linux
26-
language: generic
27-
env: MODE=pytest PYPY_VERSION=pypy-5.8
28-
- os: linux
29-
language: generic
30-
env: MODE=pytest PYPY_VERSION=pypy3.5-5.8-beta
31-
- python: 3.6
32-
env: MODE=docs
33-
- python: 3.6
34-
env: MODE=prospector
19+
# Main tests on supported Python versions.
20+
- python: 2.7
21+
env: TOXENV=py27
22+
- python: 3.5
23+
env: TOXENV=py35
24+
- python: 3.6
25+
env: TOXENV=py36
26+
- python: 2.7
27+
env: TOXENV=py27 EXTRA_DEPS=wsaccel
28+
- python: 3.5
29+
env: TOXENV=py35 EXTRA_DEPS=wsaccel
30+
- python: 3.6
31+
env: TOXENV=py36 EXTRA_DEPS=wsaccel
32+
- python: 2.7
33+
env: TOXENV=autobahn EXTRA_DEPS=wsaccel SIDE=client
34+
- python: 3.5
35+
env: TOXENV=autobahn EXTRA_DEPS=wsaccel SIDE=client
36+
- python: 3.6
37+
env: TOXENV=autobahn EXTRA_DEPS=wsaccel SIDE=client
38+
- python: 2.7
39+
env: TOXENV=autobahn EXTRA_DEPS=wsaccel SIDE=server
40+
- python: 3.5
41+
env: TOXENV=autobahn EXTRA_DEPS=wsaccel SIDE=server
42+
- python: 3.6
43+
env: TOXENV=autobahn EXTRA_DEPS=wsaccel SIDE=server
44+
- python: "pypy-5.7.1"
45+
env: TOXENV=pypy
46+
- python: "pypy3.5-5.7.1-beta"
47+
env: TOXENV=pypy
3548

36-
cache: pip
49+
# Linting, docs, and other non-test stuff.
50+
- python: 3.6
51+
env: TOXENV=lint
52+
- python: 3.6
53+
env: TOXENV=docs
54+
# - python: "2.7"
55+
# env: TOXENV=packaging
56+
57+
install:
58+
- "pip install -U pip setuptools"
59+
- "pip install -U tox"
3760

3861
script:
39-
- "./.travis/run.sh"
62+
- tox -- --verbose

Diff for: .travis/run.sh

-83
This file was deleted.

Diff for: MANIFEST.in

+5-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1-
include README.rst LICENSE
1+
include README.rst LICENSE CONTRIBUTORS.rst HISTORY.rst tox.ini Pipfile
2+
recursive-include test *.py
3+
recursive-include compliance *.py *.json
4+
graft docs
5+
prune docs/build

Diff for: compliance/run-autobahn-tests.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ def coverage(command, coverage_settings):
9292
return [sys.executable] + command
9393

9494
return ([sys.executable, "-m", "coverage", "run",
95-
"--include", coverage_settings["wsproto-path"],
96-
"--rcfile", coverage_settings["coveragerc"]]
95+
"--include", coverage_settings["wsproto-path"]]
9796
+ command)
9897

9998
def summarize(report_path):

Diff for: setup.cfg

+13
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,15 @@
11
[wheel]
22
universal = 1
3+
4+
[tool:pytest]
5+
testpaths = test
6+
addopts = --capture=no --color=yes
7+
8+
[coverage:run]
9+
branch = False
10+
11+
[coverage:report]
12+
show_missing = True
13+
exclude_lines =
14+
pragma: no cover
15+
raise NotImplementedError()

Diff for: test_requirements.txt

-3
This file was deleted.

Diff for: tox.ini

+34-7
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,48 @@
11
[tox]
2-
envlist = py27, py35, py36, pypy, pypy3, lint, docs
2+
envlist = py27, py35, py36, pypy, lint, packaging, docs
33

44
[testenv]
5-
deps = -r{toxinidir}/test_requirements.txt
6-
passenv = COVERAGE_FILE
7-
commands = pytest --cov {envsitepackagesdir}/wsproto --cov-report term-missing --cov-config {toxinidir}/.coveragerc {toxinidir}/test/
5+
deps =
6+
pytest==3.2.1
7+
pytest-cov==2.5.1
8+
{env:CI_DEPS:}
9+
{env:EXTRA_DEPS:}
10+
commands =
11+
pytest --cov=wsproto {posargs}
12+
{env:CI_COMMANDS:python -c ""}
13+
14+
[testenv:pypy]
15+
# temporarily disable coverage testing on PyPy due to performance problems
16+
commands = pytest {posargs}
17+
18+
[testenv:autobahn]
19+
deps =
20+
{env:CI_DEPS:}
21+
{env:EXTRA_DEPS:}
22+
changedir = {toxinidir}/compliance
23+
commands =
24+
python run-autobahn-tests.py {env:SIDE:}
25+
{env:CI_COMMANDS:python -c ""}
826

9-
[testenv:prospector]
27+
[testenv:lint]
1028
basepython = python3.6
11-
deps = prospector
29+
deps = prospector==0.12.7
1230
commands = prospector
1331

1432
[testenv:docs]
1533
basepython = python3.6
16-
deps = sphinx==1.4.6
34+
deps = sphinx==1.4.9
1735
whitelist_externals = make
1836
changedir = {toxinidir}/docs
1937
commands =
2038
make clean
2139
make html
40+
41+
[testenv:packaging]
42+
basepython=python2.7
43+
deps =
44+
check-manifest==0.35
45+
readme_renderer==17.2
46+
commands =
47+
check-manifest
48+
python setup.py check --metadata --restructuredtext --strict

0 commit comments

Comments
 (0)