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

feat(ci): add code cov tracking #162

Merged
merged 1 commit into from
Jan 31, 2025
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
19 changes: 19 additions & 0 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
comment:
layout: "header, files, footer" # remove "new" from "header" and "footer"
hide_project_coverage: false # set to false
require_changes: false # if true: only post the comment if coverage changes

codecov:
#due to ci-optimization, reports for modules that have not changed may be quite old
max_report_age: off

coverage:
status:
project:
default:
target: 0% # no threshold enforcement yet
only_pulls: true
patch:
default:
target: 90% # for new code added in the patch
only_pulls: true
8 changes: 8 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@ jobs:
**/build/reports/tests/test/**
**/build/test-results/test/**
**/junit.*.xml
- name: Upload datahub-actions coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
#handle_no_reports_found: true
fail_ci_if_error: false
name: datahub-actions
verbose: true

event-file:
runs-on: ubuntu-latest
Expand Down
3 changes: 0 additions & 3 deletions datahub-actions/pytest.ini

This file was deleted.

6 changes: 5 additions & 1 deletion datahub-actions/setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ disallow_untyped_defs = yes
disallow_untyped_defs = yes

[tool:pytest]
addopts = --cov=src --cov-report term-missing --cov-config setup.cfg --strict-markers
addopts = --cov=src --cov-report term-missing --cov-report xml --cov-config setup.cfg --strict-markers
markers =
dependency:Mark a dependency
integration: marks tests to only run in integration (deselect with '-m "not integration"')
testpaths =
tests/unit
Expand Down Expand Up @@ -79,3 +80,6 @@ exclude_lines =
pragma: no cover
@abstract
if TYPE_CHECKING:

[coverage:xml]
output = coverage.xml
Loading