Skip to content

Commit 0f8fdfd

Browse files
committed
ci: Add coverage report with Codecov.io
Additionally, add pytest configuration to setup.cfg. Note that we can't add this configuration to pyproject.toml as it's not yet supported. See pytest-dev/pytest#1556
1 parent 38d4041 commit 0f8fdfd

File tree

4 files changed

+19
-3
lines changed

4 files changed

+19
-3
lines changed

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@ matrix:
1313
- python: pypy3
1414
- python: nightly
1515

16-
install:
16+
before_install:
1717
- pip install --upgrade pip
1818
- pip install poetry
19+
- pip install codecov
20+
21+
install:
1922
- poetry install --no-root
2023

2124
script:
2225
- pip install .
2326
- python -m pytest tests
2427
- python -m flake8 src
28+
29+
after_success:
30+
- python -m codecov

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ Python XMLSERVICE Toolkit
55
[![Latest version released on PyPi](https://img.shields.io/pypi/v/itoolkit.svg)](https://pypi.python.org/pypi/itoolkit)
66
[![](https://img.shields.io/pypi/pyversions/itoolkit.svg)](https://pypi.org/project/itoolkit/)
77
[![Documentation Status](https://readthedocs.org/projects/python-itoolkit/badge/?version=latest)](https://python-itoolkit.readthedocs.io/en/latest/?badge=latest)
8+
[![codecov](https://codecov.io/gh/IBM/python-itoolkit/branch/master/graph/badge.svg)](https://codecov.io/gh/IBM/python-itoolkit)
9+
810

911
itoolkit is a Python interface to the [XMLSERVICE](https://github.com/IBM/xmlservice) toolkit for the [IBM i](https://en.wikipedia.org/wiki/IBM_i) platform.
1012

@@ -53,13 +55,13 @@ Tests
5355
To test the installed itoolkit
5456

5557
```bash
56-
python -m pytest tests
58+
python -m pytest
5759
```
5860

5961
To test the local code:
6062

6163
```bash
62-
PYTHONPATH=src python -m pytest tests
64+
PYTHONPATH=src python -m pytest
6365
```
6466

6567
Contributing

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ pytest-mock = ">=1.10.0"
3939
flake8 = ">=3.6.0"
4040
mock = "^3.0.5"
4141
bumpversion = "^0.5.0"
42+
pytest-cov = "~2.8"
4243

4344
[build-system]
4445
requires = ["poetry-core>=1.0.0a6"]

setup.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
[flake8]
22
max-line-length = 80
3+
4+
[tool:pytest]
5+
testpaths =
6+
tests
7+
addopts =
8+
--cov=itoolkit
9+
-r a

0 commit comments

Comments
 (0)