Ci/coverage badge (#191)

* ci: coverage badge
This commit is contained in:
z9rtm 2025-05-19 10:07:01 +09:00 committed by GitHub
parent 35282ee34c
commit 4dc0cad499
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 19 additions and 1 deletions

View file

@ -5,8 +5,12 @@ on:
branches: [ main, release ]
tags:
- 'release-*'
paths-ignore:
- "**/coverage.svg"
pull_request:
branches: [ main, release ]
paths-ignore:
- "**/coverage.svg"
env:
CARGO_TERM_COLOR: always
@ -101,6 +105,8 @@ jobs:
coverage:
name: Code Coverage
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v3
@ -130,8 +136,19 @@ jobs:
- name: Install llvm-tools-preview
run: rustup component add llvm-tools-preview
- name: Install lcov
run: sudo apt-get update && sudo apt-get install -y lcov bc
- name: Run tests with coverage
run: cargo llvm-cov --all-features
run: cargo llvm-cov --all-features --lcov --output-path lcov.info
- name: Generate coverage badge
if: github.ref == 'refs/heads/main'
uses: GoogleCloudPlatform/lcov-coverage-badge@5857899449990297b622767f36e4fa8d1218acdb
with:
file: ./lcov.info
icon_name: github
access_token: ${{ secrets.GITHUB_TOKEN }}
security_audit:
name: Security Audit

View file

@ -7,6 +7,7 @@
[![Crates.io Version](https://img.shields.io/crates/v/rmcp)](https://crates.io/crates/rmcp)
![Release status](https://github.com/modelcontextprotocol/rust-sdk/actions/workflows/release.yml/badge.svg)
[![docs.rs](https://img.shields.io/docsrs/rmcp)](https://docs.rs/rmcp/latest/rmcp)
![Coverage](coverage.svg)
An official rust Model Context Protocol SDK implementation with tokio async runtime.