Skip to content

Commit 73c0ccf

Browse files
authored
ci: test to check dependencies (#160)
1 parent faf26b0 commit 73c0ccf

File tree

1 file changed

+21
-1
lines changed

1 file changed

+21
-1
lines changed

.github/workflows/code_health.yaml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,34 @@ jobs:
5454
MDB_MCP_API_CLIENT_ID: ${{ secrets.TEST_ATLAS_CLIENT_ID }}
5555
MDB_MCP_API_CLIENT_SECRET: ${{ secrets.TEST_ATLAS_CLIENT_SECRET }}
5656
MDB_MCP_API_BASE_URL: ${{ vars.TEST_ATLAS_BASE_URL }}
57-
run: npm test -- --testPathIgnorePatterns "tests/integration/tools/mongodb" --testPathIgnorePatterns "tests/integration/[^/]+\.ts"
57+
run: npm test -- --testPathIgnorePatterns "tests/unit" --testPathIgnorePatterns "tests/integration/tools/mongodb" --testPathIgnorePatterns "tests/integration/[^/]+\.ts"
5858
- name: Upload test results
5959
uses: actions/upload-artifact@v4
6060
if: always()
6161
with:
6262
name: atlas-test-results
6363
path: coverage/lcov.info
6464

65+
dep-check:
66+
name: Check dependencies
67+
if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: GitHubSecurityLab/actions-permissions/monitor@v1
71+
- uses: actions/checkout@v4
72+
- uses: actions/setup-node@v4
73+
with:
74+
node-version-file: package.json
75+
cache: "npm"
76+
- name: Install dependencies & build
77+
run: npm ci
78+
- name: Remove dev dependencies
79+
run: |
80+
rm -rf node_modules
81+
npm pkg set scripts.prepare="exit 0"
82+
npm install --omit=dev
83+
- run: npx -y @modelcontextprotocol/inspector --cli --method tools/list -- node dist/index.js --connectionString "mongodb://localhost"
84+
6585
coverage:
6686
name: Report Coverage
6787
if: always() && github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository

0 commit comments

Comments
 (0)