Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 7856bb9

Browse files
himanshusinghsnirinchev
andauthored
chore(tests): accuracy tests for MongoDB tools exposed by MCP server MCP-39 (#341)
Co-authored-by: Nikola Irinchev <irinchev@me.com>
1 parent 2941dde commit 7856bb9

Some content is hidden

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

55 files changed

+5679
-21
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

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /