Skip to content
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
17 changes: 16 additions & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
# .coveragerc to control coverage.py
[run]
branch = True
source = src
omit = tests/*

[paths]
source =
src/
*/site-packages/

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__
if self.debug:
if self\.debug

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
11 changes: 6 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ jobs:
python-version: ${{ matrix.python }}

- name: Install tox
run: python -m pip install tox
run: python -m pip install tox coverage

- name: Run tests
run: |
tox -e default -- --cov --cov-branch --cov-report=xml
run: >-
tox
-- -rFEx --durations 10 --color yes --cov --cov-branch --cov-report=xml # pytest args

- name: Check for codecov token availability
id: codecov-check
Expand All @@ -63,7 +64,7 @@ jobs:
- name: Upload coverage reports to Codecov with GitHub Action
uses: codecov/codecov-action@v7
if: ${{ steps.codecov-check.outputs.codecov == 'true' }}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: ${{ github.repository }}
flags: ${{ matrix.platform }} - py${{ matrix.python }}
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,7 @@ addopts = "--cov --cov-report term-missing"
testpaths = [
"tests",
]

[tool.bandit]
exclude_dirs = ["tests"]
skips = ["B110"]
Loading