Skip to content

Commit 06b39ea

Browse files
committed
Get rid of CodeCov
1 parent ae68735 commit 06b39ea

File tree

4 files changed

+28
-9
lines changed

4 files changed

+28
-9
lines changed

.github/workflows/test.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,32 @@ jobs:
104104
uv run --group test coverage combine
105105
uv run --group test coverage xml -o reports/coverage.xml
106106
107-
- name: Check coverage
108-
uses: codecov/codecov-action@v5
107+
- name: Coverage comment
108+
id: coverage
109+
uses: MishaKav/pytest-coverage-comment@v1
109110
with:
110-
token: ${{ secrets.CODECOV_TOKEN }}
111-
directory: ./reports
112-
fail_ci_if_error: true
111+
pytest-xml-coverage-path: ./reports/coverage.xml
112+
default-branch: master
113+
xml-skip-covered: true
114+
report-only-changed-files: true
115+
hide-comment: ${{ github.event_name != 'pull_request' }}
116+
117+
- name: Dynamic Badges
118+
uses: schneegans/[email protected]
119+
if: github.repository == 'dolfinus/setuptools-git-versioning' && github.event_name == 'push'
120+
with:
121+
auth: ${{ secrets.PERSONAL_TOKEN }}
122+
gistID: 38b81533c2b8c389db378e3bae7df034
123+
filename: setuptools_git_versioning_badge.json
124+
label: Coverage
125+
message: ${{ steps.coverage.outputs.coverage }}
126+
color: ${{ steps.coverage.outputs.color }}
127+
128+
- name: Fail if coverage too low
129+
if: ${{ steps.coverage.outputs.coverage < env.MIN_COVERAGE }}
130+
run: |
131+
echo "Coverage is below ${{ env.MIN_COVERAGE }}%!"
132+
exit 1
113133
114134
- name: All done
115135
run: echo 1

README.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ setuptools-git-versioning
1818
:target: https://setuptools-git-versioning.readthedocs.io
1919
.. |Build| image:: https://github.com/dolfinus/setuptools-git-versioning/workflows/Tests/badge.svg
2020
:target: https://github.com/dolfinus/setuptools-git-versioning/actions
21-
.. |Coverage| image:: https://codecov.io/gh/dolfinus/setuptools-git-versioning/branch/master/graph/badge.svg?token=GIMVHUTNW4
22-
:target: https://codecov.io/gh/dolfinus/setuptools-git-versioning
21+
.. |Test Coverage| image:: https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/
22+
dolfinus/38b81533c2b8c389db378e3bae7df034/raw/setuptools_git_versioning_badge.json
23+
:target: https://github.com/dolfinus/setuptools-git-versioning/actions
2324
.. |pre-commit.ci| image:: https://results.pre-commit.ci/badge/github/dolfinus/setuptools-git-versioning/master.svg
2425
:target: https://results.pre-commit.ci/latest/github/dolfinus/setuptools-git-versioning/master
2526

docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,4 @@
3939

4040
Source Code <https://github.com/dolfinus/setuptools-git-versioning>
4141
CI/CD <https://github.com/dolfinus/setuptools-git-versioning/actions>
42-
Code Coverage <https://app.codecov.io/gh/dolfinus/setuptools-git-versioning>
4342
Issue Tracker <https://github.com/dolfinus/setuptools-git-versioning/issues>

pyproject.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ Homepage = "https://setuptools-git-versioning.readthedocs.io"
4343
Documentation = "https://setuptools-git-versioning.readthedocs.io"
4444
Source = "https://github.com/dolfinus/setuptools-git-versioning"
4545
"CI/CD" = "https://github.com/dolfinus/setuptools-git-versioning/actions"
46-
Coverage = "https://app.codecov.io/gh/dolfinus/setuptools-git-versioning"
4746
Tracker = "https://github.com/dolfinus/setuptools-git-versioning/issues"
4847

4948
[project.entry-points."distutils.setup_keywords"]

0 commit comments

Comments
 (0)