Files
googleapis--mcp-toolbox/.github/workflows/nightly_tier_report.yml
T
wehub-resource-sync e04ed9c211
CF: Deploy Dev Docs / deploy (push) Waiting to run
Sync Labels / build (push) Waiting to run
tests / unit tests (macos-latest) (push) Waiting to run
tests / unit tests (ubuntu-latest) (push) Waiting to run
tests / unit tests (windows-latest) (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:32:45 +08:00

110 lines
4.0 KiB
YAML

# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Weekly Server Tier Assessment
on:
schedule:
- cron: '0 6 * * 0' # Runs at 6 AM every Sunday
workflow_dispatch:
permissions:
contents: read
issues: write
jobs:
tier-check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
with:
persist-credentials: false
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: 'go.mod'
- name: Start MCP Toolbox Server
run: |
go build -o toolbox
./toolbox --allowed-hosts localhost --config tests/conformance/tools.yaml &
sleep 5 # Give the server a moment to bind to port 5000
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6
with:
node-version: "22"
- name: Run Server Tier Assessment
id: assessment
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx --yes @modelcontextprotocol/conformance@latest tier-check --repo ${{ github.repository }} --output markdown --conformance-server-url "http://localhost:5000/mcp" > tier_report.txt
continue-on-error: true
- name: Report Tier Status
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs');
const report = fs.readFileSync('tier_report.txt', 'utf8');
const title = '[Dashboard: Conformance] Weekly Server Tier Assessment Failure';
const prevIssues = await github.rest.issues.listForRepo({
...context.repo,
state: 'open'
});
// Find any open issue matching the exact dashboard title
let existingIssue = prevIssues.data.find(issue => issue.title === title);
if (report.includes('Tier Assessment: Tier 1')) {
console.log('Tier 1 achieved! Closing open issue if it exists.');
if (existingIssue) {
await github.rest.issues.createComment({
...context.repo,
issue_number: existingIssue.number,
body: "The weekly Server Tier Assessment confirms we are now **Tier 1**! Closing this issue."
});
await github.rest.issues.update({
...context.repo,
issue_number: existingIssue.number,
state: 'closed'
});
}
return;
}
const body = `The weekly Server Tier Assessment found gaps preventing Tier 1 status:\n\n${report}\n\nPlease fix these operational gaps.`;
if (existingIssue) {
console.log(`Found previous issue ${existingIssue.html_url}, updating body`);
await github.rest.issues.update({
...context.repo,
issue_number: existingIssue.number,
body: body
});
} else {
console.log('No previous issue found, creating one');
await github.rest.issues.create({
...context.repo,
title: title,
body: body
});
}