1111 run-tests :
1212 name : Run MongoDB tests
1313 if : github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.head.repo.full_name != github.repository
14- runs-on : ubuntu-latest
14+ strategy :
15+ matrix :
16+ os : [ubuntu-latest, macos-latest, windows-latest]
17+ fail-fast : false
18+ runs-on : ${{ matrix.os }}
1519 steps :
1620 - uses : GitHubSecurityLab/actions-permissions/monitor@v1
21+ if : matrix.os != 'windows-latest'
1722 - uses : actions/checkout@v4
1823 - uses : actions/setup-node@v4
1924 with :
@@ -24,71 +29,12 @@ jobs:
2429 - name : Run tests
2530 run : npm test
2631 - name : Upload test results
27- if : always()
32+ if : always() && matrix.os == 'ubuntu-latest'
2833 uses : actions/upload-artifact@v4
2934 with :
3035 name : test-results
3136 path : coverage/lcov.info
3237
33- run-atlas-tests :
34- name : Run Atlas tests
35- if : github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.head.repo.full_name != github.repository
36- runs-on : ubuntu-latest
37- steps :
38- - uses : GitHubSecurityLab/actions-permissions/monitor@v1
39- - uses : actions/checkout@v4
40- - uses : actions/setup-node@v4
41- with :
42- node-version-file : package.json
43- cache : " npm"
44- - name : Install dependencies
45- run : npm ci
46- - name : Run tests
47- env :
48- MDB_MCP_API_CLIENT_ID : ${{ secrets.TEST_ATLAS_CLIENT_ID }}
49- MDB_MCP_API_CLIENT_SECRET : ${{ secrets.TEST_ATLAS_CLIENT_SECRET }}
50- MDB_MCP_API_BASE_URL : ${{ vars.TEST_ATLAS_BASE_URL }}
51- run : npm test -- --testPathIgnorePatterns "tests/integration/tools/mongodb" --testPathIgnorePatterns "tests/integration/[^/]+\.ts"
52- - name : Upload test results
53- uses : actions/upload-artifact@v4
54- if : always()
55- with :
56- name : atlas-test-results
57- path : coverage/lcov.info
58-
59- coverage :
60- name : Report Coverage
61- if : always() && github.event.pull_request.user.login == 'dependabot[bot]' || github.event.pull_request.head.repo.full_name != github.repository
62- runs-on : ubuntu-latest
63- needs : [run-tests, run-atlas-tests]
64- steps :
65- - uses : actions/checkout@v4
66- - uses : actions/setup-node@v4
67- with :
68- node-version-file : package.json
69- cache : " npm"
70- - name : Install dependencies
71- run : npm ci
72- - name : Download test results
73- uses : actions/download-artifact@v4
74- with :
75- name : test-results
76- path : coverage/mongodb
77- - name : Download atlas test results
78- uses : actions/download-artifact@v4
79- with :
80- name : atlas-test-results
81- path : coverage/atlas
82- - name : Merge coverage reports
83- run : |
84- npx -y lcov-result-merger@5.0.1 "coverage/*/lcov.info" "coverage/lcov.info"
85- - name : Coveralls GitHub Action
86- uses : coverallsapp/github-action@v2.3.6
87- with :
88- file : coverage/lcov.info
89- git-branch : ${{ github.head_ref || github.ref_name }}
90- git-commit : ${{ github.event.pull_request.head.sha || github.sha }}
91-
9238 merge-dependabot-pr :
9339 name : Merge Dependabot PR
9440 if : github.event.pull_request.user.login == 'dependabot[bot]'
9743 pull-requests : write
9844 contents : write
9945 needs :
100- - coverage
46+ - run-tests
10147 steps :
10248 - name : Enable auto-merge for Dependabot PRs
10349 run : gh pr merge --auto --squash "$PR_URL"
0 commit comments