This commit is contained in:
blazickjp
2025-04-01 18:04:07 -07:00
parent e7c2d2ffd1
commit 8729dde74b
3 changed files with 49 additions and 2 deletions

29
.github/workflows/badge.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Test Status Badge
on:
push:
branches: [ main, master ]
workflow_run:
workflows: ["Run Tests"]
branches: [ main, master ]
types:
- completed
jobs:
badge:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Generate test status badge
uses: schneegans/dynamic-badges-action@v1.6.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: ${{ secrets.GIST_ID }}
filename: test-status.json
label: tests
message: ${{ github.event.workflow_run.conclusion == 'success' && 'passing' || 'failing' }}
color: ${{ github.event.workflow_run.conclusion == 'success' && 'brightgreen' || 'red' }}

View File

@@ -47,6 +47,23 @@ jobs:
# or just:
# uv pip install --system -e .
- name: Run tests with pytest
# Run tests differently based on platform
- name: Run tests on Linux/macOS
if: runner.os != 'Windows'
run: |
pytest --cov=./ --cov-report=xml -v
pytest --cov=./ --cov-report=xml -v
- name: Run tests on Windows
if: runner.os == 'Windows'
run: |
pytest --cov=./ --cov-report=xml -v
# Upload coverage to Codecov
- name: Upload coverage to Codecov
if: runner.os == 'Linux' && matrix.python-version == '3.11'
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.xml
flags: unittests
fail_ci_if_error: false

View File

@@ -1,6 +1,7 @@
[![Twitter Follow](https://img.shields.io/twitter/follow/JoeBlazick?style=social)](https://twitter.com/JoeBlazick)
[![smithery badge](https://smithery.ai/badge/arxiv-mcp-server)](https://smithery.ai/server/arxiv-mcp-server)
[![Python Version](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
[![Tests](https://github.com/blazickjp/arxiv-mcp-server/actions/workflows/tests.yml/badge.svg)](https://github.com/blazickjp/arxiv-mcp-server/actions/workflows/tests.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![PyPI Downloads](https://img.shields.io/pypi/dm/arxiv-mcp-server.svg)](https://pypi.org/project/arxiv-mcp-server/)
[![PyPI Version](https://img.shields.io/pypi/v/arxiv-mcp-server.svg)](https://pypi.org/project/arxiv-mcp-server/)