31
31
cache : " npm"
32
32
- name : Install dependencies
33
33
run : npm ci
34
- - name : Run style check
35
- run : npm run generate
34
+ - run : npm run generate
36
35
37
36
run-tests :
38
37
strategy :
44
43
- uses : GitHubSecurityLab/actions-permissions/monitor@v1
45
44
if : matrix.os != 'windows-latest'
46
45
- uses : actions/checkout@v4
46
+ - uses : actions/setup-node@v4
47
+ with :
48
+ node-version-file : package.json
49
+ cache : " npm"
50
+ - name : Install dependencies
51
+ run : npm ci
52
+ - name : Run tests
53
+ run : npm test
54
+ - name : Upload test results
55
+ if : always() && matrix.os == 'ubuntu-latest'
56
+ uses : actions/upload-artifact@v4
57
+ with :
58
+ name : test-results
59
+ path : coverage/lcov.info
60
+
61
+ run-atlas-tests :
62
+ runs-on : ubuntu-latest
63
+ steps :
64
+ - uses : GitHubSecurityLab/actions-permissions/monitor@v1
65
+ - uses : actions/checkout@v4
47
66
- uses : actions/setup-node@v4
48
67
with :
49
68
node-version-file : package.json
@@ -55,10 +74,40 @@ jobs:
55
74
MDB_MCP_API_CLIENT_ID : ${{ secrets.TEST_ATLAS_CLIENT_ID }}
56
75
MDB_MCP_API_CLIENT_SECRET : ${{ secrets.TEST_ATLAS_CLIENT_SECRET }}
57
76
MDB_MCP_API_BASE_URL : ${{ vars.TEST_ATLAS_BASE_URL }}
58
- run : npm test
77
+ run : npm test -- --testPathIgnorePatterns "tests/integration/tools/mongodb" --testPathIgnorePatterns "tests/integration/[^/]+\.ts"
78
+ - name : Upload test results
79
+ uses : actions/upload-artifact@v4
80
+ if : always()
81
+ with :
82
+ name : atlas-test-results
83
+ path : coverage/lcov.info
84
+ coverage :
85
+ runs-on : ubuntu-latest
86
+ needs : [run-tests, run-atlas-tests]
87
+ if : always()
88
+ steps :
89
+ - uses : actions/checkout@v4
90
+ - uses : actions/setup-node@v4
91
+ with :
92
+ node-version-file : package.json
93
+ cache : " npm"
94
+ - name : Install dependencies
95
+ run : npm ci
96
+ - name : Download test results
97
+ uses : actions/download-artifact@v4
98
+ with :
99
+ name : test-results
100
+ path : coverage/mongodb
101
+ - name : Download atlas test results
102
+ uses : actions/download-artifact@v4
103
+ with :
104
+ name : atlas-test-results
105
+ path : coverage/atlas
106
+ - name : Merge coverage reports
107
+ run : |
108
+ npx -y lcov-result-merger "coverage/*/lcov.info" "coverage/lcov.info"
59
109
- name : Coveralls GitHub Action
60
110
uses :
coverallsapp/[email protected]
61
- if : matrix.os == 'ubuntu-latest'
62
111
with :
63
112
file : coverage/lcov.info
64
113
git-branch : ${{ github.head_ref || github.ref_name }}
0 commit comments