Skip to content

Commit

Permalink
Add coverage.py and coveralls.io integration to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnans2006 committed Jun 30, 2024
1 parent 3ded115 commit 305ca99
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,22 @@ jobs:
- name: Run Tests
run: pipenv run python3 manage.py test

- name: Run Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
parallel: true
flag-name: Pyenv Unit Tests

test_success:
needs: test
runs-on: ubuntu-latest
steps:
- name: Handle Coveralls Finish
uses: AndreMiras/coveralls-python-action@develop
with:
github-token: ${{ secrets.COVERALLS_REPO_TOKEN }}
parallel-finished: true

docs:
runs-on: ubuntu-latest

Expand Down
15 changes: 13 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,24 @@ packages = ["tin"]
dependencies = { file = "requirements.txt" }

[tool.pytest.ini_options]
DJANGO_SETTINGS_MODULE="tin.settings"
python_files="tests.py test_*.py *_tests.py"
DJANGO_SETTINGS_MODULE = "tin.settings"
python_files= "tests.py test_*.py *_tests.py"
norecursedirs = ["media", "migrations", "sandboxing"]
testpaths = "tin"
addopts = "--doctest-modules tin --import-mode=importlib"
doctest_optionflags = "NORMALIZE_WHITESPACE NUMBER"

[tool.coverage.run]
branch = true
source = ["tin"]
omit = [
"*/migrations/*",
"*/apps.py",
"*/urls.py",
"*/wsgi.py",
]
relative_files = true

[tool.black]
line-length = 100
exclude = '''
Expand Down

0 comments on commit 305ca99

Please sign in to comment.