Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

add test coverage to PR comment using py-cov-action #638

Merged
merged 7 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
6 changes: 6 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,9 @@ jobs:
- name: Test
run: |
py.test
- name: Coverage comment
id: coverage_comment
uses: py-cov-action/python-coverage-comment-action@v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

5 changes: 5 additions & 0 deletions aaq/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,8 @@ def search(query_text, generate_llm_response, query_metadata):
json_msg.update(check_urgency_response)

return json_msg


def test_untested_lines(num_one, num_two):
total_s = num_one + num_two
return total_s
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ addopts = --verbose --ds=ndoh_hub.testsettings --ignore=ve --cov=ndoh_hub --cov=
[coverage:run]
branch =True
omit = *migrations/*,*test*.py
relative_files = True

[mypy]
ignore_missing_imports = True
Expand Down
Loading