Skip to content

Commit c48d816

Browse files
authored
Merge pull request pallets-eco#543 from davidism/tests
update testing matrix, add coverage report
2 parents f93c737 + e91bb0e commit c48d816

File tree

6 files changed

+87
-22
lines changed

6 files changed

+87
-22
lines changed

.codecov.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
comment: off
2+
coverage:
3+
status:
4+
project: off
5+
patch: off

.coveragerc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[run]
2+
branch = True
3+
source =
4+
flask_sqlalchemy
5+
tests
6+
7+
[paths]
8+
source =
9+
flask_sqlalchemy
10+
.tox/*/lib/python*/site-packages/flask_sqlalchemy
11+
.tox/pypy/site-packages/flask_sqlalchemy

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@ docs/_build
88
*.egg
99
.idea/
1010
.cache/
11+
htmlcov
12+
.coverage
13+
.coverage.*

.travis.yml

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,40 @@
11
sudo: false
22
language: python
33

4-
python:
5-
- "2.6"
6-
- "2.7"
7-
- "pypy"
8-
- "3.3"
9-
- "3.4"
10-
- "3.5"
11-
- "3.6-dev"
12-
13-
env:
14-
- REQUIREMENTS=lowest
15-
- REQUIREMENTS=current
4+
matrix:
5+
include:
6+
- python: 3.6
7+
env: TOXENV=py,codecov
8+
- python: 3.5
9+
env: TOXENV=py,codecov
10+
- python: 3.4
11+
env: TOXENV=py,codecov
12+
- python: 3.3
13+
env: TOXENV=py,py-lowest,codecov
14+
- python: 2.7
15+
env: TOXENV=py,py,codecov
16+
- python: 2.6
17+
env: TOXENV=py,py-lowest,codecov
18+
- python: pypy
19+
env: TOXENV=py,codecov
20+
- python: nightly
21+
env: TOXENV=py,codecov
22+
- python: 3.6
23+
env: TOXENV=docs_html
1624

1725
install:
1826
- pip install tox
1927

2028
script:
21-
- tox -e py-$REQUIREMENTS
29+
- tox
30+
31+
cache:
32+
- pip
33+
34+
branches:
35+
only:
36+
- master
37+
- /^.*-maintenance$/
2238

2339
notifications:
2440
email: false

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ tag_date = 1
66
release = egg_info -Db ''
77

88
[tool:pytest]
9-
norecursedirs = .* _* scripts {args}
9+
minversion = 3.0
10+
testpaths = tests
1011

1112
[bdist_wheel]
1213
universal = 1

tox.ini

Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,45 @@
11
[tox]
2-
envlist = {py26,py27,pypy,py33,py34,py35,py36}-{lowest,current}
2+
envlist =
3+
py{36,35,34,33,27,26,py}
4+
py{36,33,27,26,py}-lowest
5+
docs_html
6+
coverage_report
37

48
[testenv]
5-
commands = py.test {posargs}
6-
79
deps =
8-
pytest
10+
pytest>=3
11+
coverage
12+
blinker
913

1014
lowest: flask==0.10
1115
lowest: sqlalchemy==0.8
12-
lowest: blinker==1.0
1316

14-
current: flask
15-
current: sqlalchemy
16-
current: blinker
17+
commands =
18+
coverage run -p -m pytest
19+
20+
[testenv:docs_html]
21+
deps = sphinx
22+
commands = sphinx-build -W -b html -d {envtmpdir}/doctrees docs docs/_build/html
23+
24+
[testenv:docs_linkcheck]
25+
deps = sphinx
26+
commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees docs docs/_build/linkcheck
27+
28+
[testenv:coverage_report]
29+
deps = coverage
30+
skip_install = true
31+
commands =
32+
coverage combine
33+
coverage report
34+
coverage html
35+
36+
[testenv:codecov]
37+
passenv = CI TRAVIS TRAVIS_*
38+
deps =
39+
codecov
40+
skip_install = true
41+
commands =
42+
python -c 'import sys, pip; sys.version_info < (2, 7) and pip.main(["install", "argparse", "-q"])'
43+
coverage combine
44+
coverage report
45+
codecov

0 commit comments

Comments
 (0)