Skip to content

Commit 5058fa6

Browse files
committed
Merge branch 'main' into MCP-42
2 parents 427663f + 7856bb9 commit 5058fa6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+5840
-36
lines changed

.github/workflows/accuracy-tests.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Accuracy Tests
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
types:
10+
- labeled
11+
12+
jobs:
13+
run-accuracy-tests:
14+
name: Run Accuracy Tests
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
pull-requests: write
19+
if: |
20+
github.event_name == 'workflow_dispatch' ||
21+
(github.event_name == 'pull_request' && github.event.label.name == 'accuracy-tests')
22+
env:
23+
MDB_OPEN_AI_API_KEY: ${{ secrets.ACCURACY_OPEN_AI_API_KEY }}
24+
MDB_GEMINI_API_KEY: ${{ secrets.ACCURACY_GEMINI_API_KEY }}
25+
MDB_AZURE_OPEN_AI_API_KEY: ${{ secrets.ACCURACY_AZURE_OPEN_AI_API_KEY }}
26+
MDB_AZURE_OPEN_AI_API_URL: ${{ vars.ACCURACY_AZURE_OPEN_AI_API_URL }}
27+
MDB_ACCURACY_MDB_URL: ${{ secrets.ACCURACY_MDB_CONNECTION_STRING }}
28+
MDB_ACCURACY_MDB_DB: ${{ vars.ACCURACY_MDB_DB }}
29+
MDB_ACCURACY_MDB_COLLECTION: ${{ vars.ACCURACY_MDB_COLLECTION }}
30+
MDB_ACCURACY_BASELINE_COMMIT: ${{ github.event.pull_request.base.sha || '' }}
31+
steps:
32+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
33+
- uses: actions/checkout@v4
34+
- uses: actions/setup-node@v4
35+
with:
36+
node-version-file: package.json
37+
cache: "npm"
38+
- name: Install dependencies
39+
run: npm ci
40+
- name: Run accuracy tests
41+
run: npm run test:accuracy
42+
- name: Upload accuracy test summary
43+
if: always()
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: accuracy-test-summary
47+
path: .accuracy/test-summary.html
48+
- name: Comment summary on PR
49+
if: github.event_name == 'pull_request' && github.event.label.name == 'accuracy-tests'
50+
uses: marocchino/sticky-pull-request-comment@d2ad0de260ae8b0235ce059e63f2949ba9e05943 # v2
51+
with:
52+
# Hides the previous comment and add a comment at the end
53+
hide_and_recreate: true
54+
hide_classify: "OUTDATED"
55+
path: .accuracy/test-brief.md

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ state.json
1111

1212
tests/tmp
1313
coverage
14+
# Generated assets by accuracy runs
15+
.accuracy

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ A Model Context Protocol server for interacting with MongoDB Databases and Mongo
2828

2929
## Prerequisites
3030

31-
- Node.js (v20.19.0 or later)
31+
- Node.js
32+
- At least 20.19.0
33+
- When using v22 then at least v22.12.0
34+
- Otherwise any version 23+
3235

3336
```shell
3437
node -v

0 commit comments

Comments
 (0)