From 3d1db3068e0dcef53fcf4a39a3503219c387abfd Mon Sep 17 00:00:00 2001 From: Gao Sun Date: Thu, 1 May 2025 22:30:19 -0700 Subject: [PATCH] ci: add codecov --- .github/workflows/codecov.yml | 34 ++++++++++++++++++++++++++++++++++ README.md | 12 ++++++------ 2 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..885da7d --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,34 @@ +name: Codecov + +on: + push: + branches: + - master + pull_request: + +concurrency: + group: codecov-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + codecov: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 # To ensure we have enough history for code coverage + + - uses: astral-sh/setup-uv@v6 + with: + python-version: 3.12 + + - name: Test with Python 3.12 + run: uv run --frozen pytest --cov --cov-branch --cov-report=xml + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v5 + with: + fail_ci_if_error: true + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/README.md b/README.md index 9439015..1970413 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ [![GitHub branch check runs](https://img.shields.io/github/check-runs/mcp-auth/python/master)](https://github.com/mcp-auth/python/actions?query=branch%3Amaster) [![codecov](https://codecov.io/gh/mcp-auth/python/graph/badge.svg?token=JXZ4C50SCV)](https://codecov.io/gh/mcp-auth/python) -[![Stable Version](https://img.shields.io/pypi/v/mcp-auth?label=stable)][PyPI Releases] -[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mcp-auth)][PyPI] -[![PyPI - License](https://img.shields.io/pypi/l/mcp-auth)](https://github.com/mcp-auth/python/blob/master/LICENSE) +[![Stable Version](https://img.shields.io/pypi/v/mcpauth?label=stable)][PyPI Releases] +[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/mcpauth)][PyPI] +[![PyPI - License](https://img.shields.io/pypi/l/mcpauth)](https://github.com/mcp-auth/python/blob/master/LICENSE) [Website]: https://mcp-auth.dev/ -[PyPI]: https://pypi.org/project/mcp-auth/ -[PyPI Releases]: https://pypi.org/project/mcp-auth/#history +[PyPI]: https://pypi.org/project/mcpauth/ +[PyPI Releases]: https://pypi.org/project/mcpauth/#history The MCP specification [requires OAuth 2.1 and other RFCs](https://modelcontextprotocol.io/specification/2025-03-26/basic/authorization) to be implemented for authorization. MCP Auth aims to connect your MCP server to **any** compatible OAuth 2 or OpenID Connect provider, without spending hours on lengthy implementations. @@ -21,7 +21,7 @@ Check out the [MCP-compatible providers](https://mcp-auth.dev/docs/providers-lis ### Installation ```bash -pip install mcp-auth +pip install mcpauth ``` Or use your package manager of choice, such as `poetry` or `uv`.