Skip to content

Commit

Permalink
ci: Add coverage report with Codecov.io
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kadler committed May 21, 2020
1 parent 38d4041 commit 0f8fdfd
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@ matrix:
- python: pypy3
- python: nightly

install:
before_install:
- pip install --upgrade pip
- pip install poetry
- pip install codecov

install:
- poetry install --no-root

script:
- pip install .
- python -m pytest tests
- python -m flake8 src

after_success:
- python -m codecov
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Python XMLSERVICE Toolkit
[![Latest version released on PyPi](https://img.shields.io/pypi/v/itoolkit.svg)](https://pypi.python.org/pypi/itoolkit)
[![](https://img.shields.io/pypi/pyversions/itoolkit.svg)](https://pypi.org/project/itoolkit/)
[![Documentation Status](https://readthedocs.org/projects/python-itoolkit/badge/?version=latest)](https://python-itoolkit.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/IBM/python-itoolkit/branch/master/graph/badge.svg)](https://codecov.io/gh/IBM/python-itoolkit)


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.

Expand Down Expand Up @@ -53,13 +55,13 @@ Tests
To test the installed itoolkit

```bash
python -m pytest tests
python -m pytest
```

To test the local code:

```bash
PYTHONPATH=src python -m pytest tests
PYTHONPATH=src python -m pytest
```

Contributing
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ pytest-mock = ">=1.10.0"
flake8 = ">=3.6.0"
mock = "^3.0.5"
bumpversion = "^0.5.0"
pytest-cov = "~2.8"

[build-system]
requires = ["poetry-core>=1.0.0a6"]
Expand Down
7 changes: 7 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,2 +1,9 @@
[flake8]
max-line-length = 80

[tool:pytest]
testpaths =
tests
addopts =
--cov=itoolkit
-r a

0 comments on commit 0f8fdfd

Please sign in to comment.