Skip to content

chore(deps-dev): update pre-commit requirement (#190) #111

chore(deps-dev): update pre-commit requirement (#190)

chore(deps-dev): update pre-commit requirement (#190) #111

Workflow file for this run

name: Bench Dashboard
# Runs ``bench/`` on every push to master and publishes the results
# as a static dashboard on GitHub Pages. Public transparency is the
# differentiator vs other RAG projects in the OSS space.
#
# IMPORTANT: this workflow is dormant until the maintainer enables
# GitHub Pages on the repo (Settings -> Pages -> Source: GitHub Actions).
# Until then, the deploy step skips with a warning. Bench results are
# still produced as workflow artifacts so the data is available for
# manual inspection.
on:
push:
branches: [master]
paths-ignore:
- 'docs/**'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
bench:
name: "Run benchmarks + build dashboard"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install package + bench deps
shell: bash
run: |
pip install -e .
pip install pytest pytest-benchmark psutil numpy
- name: Run benchmarks
shell: bash
env:
HF_HUB_OFFLINE: "1"
TRANSFORMERS_OFFLINE: "1"
HF_HUB_DISABLE_PROGRESS_BARS: "1"
run: |
pytest bench/ --benchmark-only --benchmark-min-rounds=5 \
--benchmark-json=bench-current.json
- name: Build dashboard site
shell: bash
run: |
mkdir -p site
# Copy the versioned static assets (HTML/CSS/JS) from the repo — this
# replaces the old inline heredoc so the design is properly reviewable
# in PRs and shipped with the same file layout as production.
cp bench/dashboard/index.html site/index.html
cp bench/dashboard/styles.css site/styles.css
cp bench/dashboard/dashboard.js site/dashboard.js
# Produce the data payload consumed by dashboard.js.
python bench/dashboard/build.py \
--input bench-current.json \
--output site/data.json \
--commit "${GITHUB_SHA:0:7}" \
--version "$(python -c 'import mcp_server; print(mcp_server.__version__)')"
echo "Site contents:"
ls -la site/
- uses: actions/upload-artifact@v7
with:
name: bench-dashboard
path: site/
- name: Setup Pages
if: github.event_name == 'push'
uses: actions/configure-pages@v6
continue-on-error: true # Pages may not be enabled on the repo yet
- name: Upload to Pages
if: github.event_name == 'push'
uses: actions/upload-pages-artifact@v5
with:
path: site
continue-on-error: true
- name: Deploy to Pages
if: github.event_name == 'push'
uses: actions/deploy-pages@v5
continue-on-error: true