Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Pytest coverage #417

Merged
merged 7 commits into from
Jun 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[run]
source = src/briefcase
omit =
src/**/__init__.py
src/briefcase/__main__.py

[report]
show_missing = True
7 changes: 7 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ jobs:
- name: Test
run: |
tox -e py
- name: Check coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
fail_ci_if_error: true

python-versions:
# Only run this and subsequent steps on branches.
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ distribute-*
.python-version
.pytest_cache
.coverage
coverage.xml
venv/
.vscode/
.eggs/
Expand Down
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ include docs/spelling_wordlist
include tests/integrations/xcode/simctl/README
include pyproject.toml
include tox.ini
include .coveragerc
recursive-include changes *.rst
recursive-include src *.py
recursive-include docs *.bat
Expand Down
1 change: 1 addition & 0 deletions changes/417.feature.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Added pytest coverage to CI/CD process.
5 changes: 4 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ envlist = flake8,towncrier-check,docs,package,py{35,36,37,38},pypy3
skip_missing_interpreters = true

[testenv]
setenv = PYTHONPATH = {toxinidir}/src
deps =
pytest
pytest-tldr
pytest-cov
commands =
pytest -vv
pytest --cov -vv
coverage xml

[testenv:flake8]
skip_install = True
Expand Down