Skip to content

fix: implement sliding window expiration for MCP sessions #47

fix: implement sliding window expiration for MCP sessions

fix: implement sliding window expiration for MCP sessions #47

Workflow file for this run

name: Test & Coverage
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Generate Prisma client
run: npx prisma generate
- name: Run tests with coverage
run: pnpm test:coverage -- --reporter=json --outputFile=coverage/test-results.json
- name: Coverage report PR comment
if: always()
uses: davelosert/vitest-coverage-report-action@v2
with:
json-summary-path: coverage/coverage-summary.json
json-final-path: coverage/coverage-final.json
vite-config-path: vitest.config.ts
- name: Extract coverage percentage
if: github.ref == 'refs/heads/main' && always()
id: coverage
run: |
PCT=$(node -e "const s=JSON.parse(require('fs').readFileSync('coverage/coverage-summary.json','utf8')); console.log(s.total.lines.pct)")
echo "pct=$PCT" >> $GITHUB_OUTPUT
- name: Update coverage badge
if: github.ref == 'refs/heads/main' && always()
uses: schneegans/dynamic-badges-action@v1.7.0
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: f245ebf1cf02d5f6e3df389f836a072a
filename: coverage-badge.json
label: coverage
message: ${{ steps.coverage.outputs.pct }}%
valColorRange: ${{ steps.coverage.outputs.pct }}
minColorRange: 50
maxColorRange: 100
- name: Upload coverage report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/