From 6ce733a5fb58c78a04fc0df00e881dac7db8c63c Mon Sep 17 00:00:00 2001 From: mdevolde Date: Sat, 20 Jun 2026 20:02:44 +0200 Subject: [PATCH] docs: replace manual cov badge by codecov --- .github/workflows/test.yml | 13 ++++++++++++- README.md | 2 +- coverage-badge.svg | 1 - 3 files changed, 13 insertions(+), 3 deletions(-) delete mode 100644 coverage-badge.svg diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c85a008..a0cd765 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,6 +15,9 @@ jobs: timeout-minutes: 20 name: Test on ${{ matrix.os }} Python ${{ matrix.python-version }} runs-on: ${{ matrix.os }} + permissions: + contents: read + id-token: write # Required for Codecov OIDC authentication strategy: fail-fast: false matrix: @@ -51,12 +54,20 @@ jobs: - name: Clone repository uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # 6.0.3 with: - persist-credentials: false + persist-credentials: true # Required for Codecov OIDC authentication - name: Test with pytest run: | uv run --python ${{ matrix.python-version }} --group tests --locked pytest + - name: Upload coverage to Codecov + if: matrix.os == 'ubuntu-26.04' && matrix.python-version == '3.14' + uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 + with: + use_oidc: true + files: ./coverage.xml + fail_ci_if_error: false + lint: timeout-minutes: 10 name: Lint with Ruff diff --git a/README.md b/README.md index 78dd092..e03907b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![language tool python on pypi](https://img.shields.io/pypi/v/language-tool-python)](https://pypi.org/project/language-tool-python/) [![Documentation Status](https://readthedocs.org/projects/language-tool-python/badge/?version=latest)](https://language-tool-python.readthedocs.io/en/latest/) [![Test with PyTest](https://github.com/jxmorris12/language_tool_python/workflows/Test%20with%20PyTest/badge.svg)](https://github.com/jxmorris12/language_tool_python/actions) -[![Coverage Status](https://raw.githubusercontent.com/jxmorris12/language_tool_python/master/coverage-badge.svg)](https://github.com/jxmorris12/language_tool_python/actions) +[![Coverage Status](https://codecov.io/gh/jxmorris12/language_tool_python/branch/master/graph/badge.svg)](https://codecov.io/gh/jxmorris12/language_tool_python) [![Downloads](https://img.shields.io/pypi/dw/language-tool-python)](https://pypistats.org/packages/language-tool-python) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE) [![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/jxmorris12/language_tool_python/pulls) diff --git a/coverage-badge.svg b/coverage-badge.svg deleted file mode 100644 index a3ff01c..0000000 --- a/coverage-badge.svg +++ /dev/null @@ -1 +0,0 @@ -coverage: 77.34%coverage77.34% \ No newline at end of file