From f204ebdc10f8c1e7a50bb16f0281d4a55948828d Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 6 Nov 2024 19:13:34 -0500 Subject: [PATCH 1/2] use latest .codecov.yml, remove coveragerc, add codecov secret to test on pr workflow --- .codecov.yml | 42 ++++++++----------------------- .coveragerc | 13 ---------- .github/workflows/tests-on-pr.yml | 2 ++ 3 files changed, 13 insertions(+), 44 deletions(-) delete mode 100644 .coveragerc diff --git a/.codecov.yml b/.codecov.yml index 04dd6510..7e61a29f 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -1,34 +1,14 @@ -# codecov can find this file anywhere in the repo, so we don't need to clutter -# the root folder. -#comment: false - -codecov: - notify: - require_ci_to_pass: no - coverage: status: - patch: + project: # more options at https://docs.codecov.com/docs/commit-status default: - target: '70' - if_no_uploads: error - if_not_found: success - if_ci_failed: failure - project: - default: false - library: - target: auto - if_no_uploads: error - if_not_found: success - if_ci_failed: error - paths: '!*/tests/.*' - - tests: - target: 97.9% - paths: '*/tests/.*' - if_not_found: success - -flags: - tests: - paths: - - tests/ + target: auto # use the coverage from the base commit, fail if coverage is lower + threshold: 0% # allow the coverage to drop by + +comment: + layout: " diff, flags, files" + behavior: default + require_changes: false + require_base: false # [true :: must have a base report to post] + require_head: false # [true :: must have a head report to post] + hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage] \ No newline at end of file diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 0ed6eac5..00000000 --- a/.coveragerc +++ /dev/null @@ -1,13 +0,0 @@ -[run] -source = - diffpy.utils -[report] -omit = - */python?.?/* - */site-packages/nose/* - # ignore _version.py and versioneer.py - .*version.* - *_version.py - -exclude_lines = - if __name__ == '__main__': diff --git a/.github/workflows/tests-on-pr.yml b/.github/workflows/tests-on-pr.yml index dd0a102e..baac1aeb 100644 --- a/.github/workflows/tests-on-pr.yml +++ b/.github/workflows/tests-on-pr.yml @@ -14,3 +14,5 @@ jobs: project: diffpy.utils c_extension: false headless: false + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From aa2ce946de4e543cab7f0497f88fffb7d40586c4 Mon Sep 17 00:00:00 2001 From: Sangjoon Bob Lee Date: Wed, 6 Nov 2024 19:14:18 -0500 Subject: [PATCH 2/2] Apply precommit --- .codecov.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.codecov.yml b/.codecov.yml index 7e61a29f..5a94096e 100644 --- a/.codecov.yml +++ b/.codecov.yml @@ -11,4 +11,4 @@ comment: require_changes: false require_base: false # [true :: must have a base report to post] require_head: false # [true :: must have a head report to post] - hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage] \ No newline at end of file + hide_project_coverage: false # [true :: only show coverage on the git diff aka patch coverage]