1+ name : Accuracy Tests
2+
3+ on :
4+ workflow_dispatch :
5+ pull_request :
6+ types : [labeled]
7+
8+ jobs :
9+ run-accuracy-tests :
10+ name : Run Accuracy Tests
11+ runs-on : ubuntu-latest
12+ if : |
13+ github.event_name == 'workflow_dispatch' ||
14+ (github.event_name == 'pull_request' && github.event.label.name == 'accuracy-tests')
15+ env :
16+ MDB_OPEN_AI_API_KEY : ${{ secrets.MDB_OPEN_AI_API_KEY }}
17+ MDB_GEMINI_API_KEY : ${{ secrets.MDB_GEMINI_API_KEY }}
18+ MDB_AZURE_OPEN_AI_API_KEY : ${{ secrets.MDB_AZURE_OPEN_AI_API_KEY }}
19+ MDB_AZURE_OPEN_AI_API_URL : ${{ secrets.MDB_AZURE_OPEN_AI_API_URL }}
20+ MDB_ACCURACY_MDB_URL : ${{ secrets.MDB_ACCURACY_MDB_URL }}
21+ MDB_ACCURACY_MDB_DB : ${{ secrets.MDB_ACCURACY_MDB_DB }}
22+ MDB_ACCURACY_MDB_COLLECTION : ${{ secrets.MDB_ACCURACY_MDB_COLLECTION }}
23+ steps :
24+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
25+ - uses : actions/checkout@v4
26+ - uses : actions/setup-node@v4
27+ with :
28+ node-version-file : package.json
29+ cache : ' npm'
30+ - name : Install dependencies
31+ run : npm ci
32+ - name : Run accuracy tests
33+ run : ./scripts/run-accuracy-tests.sh
34+ - name : Upload accuracy test summary
35+ if : always()
36+ uses : actions/upload-artifact@v4
37+ with :
38+ name : accuracy-test-summary
39+ path : .accuracy/tests-summary.html
40+ - name : Comment summary on PR
41+ if : github.event_name == 'pull_request' && github.event.label.name == 'accuracy-tests'
42+ uses : marocchino/sticky-pull-request-comment@v2
43+ with :
44+ path : .accuracy/tests-summary.html
0 commit comments