Skip to content

Commit

Permalink
Adjust coverage coveralls to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
pitbulk committed Jun 23, 2024
1 parent 89586c3 commit 66e1a2c
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 39 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,14 @@ jobs:
make install-test
- name: Test
run: make pytest
- name: Run coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
pip install coveralls
coverage run -m pytest
coverage report -m
coveralls
lint:
runs-on: ubuntu-22.04
environment: CI
Expand All @@ -71,11 +79,3 @@ jobs:
run: |
make flake8
make black
- name: Run coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
pip install coveralls
coverage run setup.py test
coverage report -m
coveralls
29 changes: 28 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Changelog = "https://github.com/SAML-Toolkits/python3-saml/blob/master/changelog

[project.optional-dependencies]
test = [
"coverage>=4.5.2",
"coverage[toml]>=4.5.2",
"pytest>=4.6",
]
lint = [
Expand Down Expand Up @@ -93,3 +93,30 @@ atomic = true
ignore_comments = true
skip_gitignore = true
src_paths = ['src']

[tool.coverage.run]
branch = true

[tool.coverage.paths]
source = [
"src/onelogin/saml2"
]

[tool.coverage.report]
# Regexes for lines to exclude from consideration
exclude_lines = [
"pragma: no cover",
"def __repr__",
"if self.debug",
"if debug",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:"
]
show_missing = true
ignore_errors = true


[tool.coverage.html]
directory = "coverage_html_report"
30 changes: 0 additions & 30 deletions tests/coverage.rc

This file was deleted.

0 comments on commit 66e1a2c

Please sign in to comment.