-
Notifications
You must be signed in to change notification settings - Fork 41
ci: test to check dependencies #160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR aims to update the CI configuration for dependency testing while adjusting the test execution pattern.
- The test command has been updated to exclude the "tests/unit" folder.
- A new "dep-check" job has been added to install production dependencies and run an inspector tool.
Comments suppressed due to low confidence (2)
.github/workflows/code_health.yaml:57
- Excluding tests/unit from the test command may reduce overall unit test coverage. Please confirm that unit tests are being executed in another job or that this exclusion is intentional.
run: npm test -- --testPathIgnorePatterns "tests/unit" --testPathIgnorePatterns "tests/integration/tools/mongodb" --testPathIgnorePatterns "tests/integration/[^/]+\.ts"
.github/workflows/code_health.yaml:76
- The 'Install dependencies & build' step only runs 'npm ci' without an explicit build command. Consider adding a build command (e.g. 'npm run build') to ensure that the 'dist' directory is up-to-date for the subsequent inspector execution.
- name: Install dependencies & build
@@ -54,14 +54,34 @@ jobs: | |||
MDB_MCP_API_CLIENT_ID: ${{ secrets.TEST_ATLAS_CLIENT_ID }} | |||
MDB_MCP_API_CLIENT_SECRET: ${{ secrets.TEST_ATLAS_CLIENT_SECRET }} | |||
MDB_MCP_API_BASE_URL: ${{ vars.TEST_ATLAS_BASE_URL }} | |||
run: npm test -- --testPathIgnorePatterns "tests/integration/tools/mongodb" --testPathIgnorePatterns "tests/integration/[^/]+\.ts" | |||
run: npm test -- --testPathIgnorePatterns "tests/unit" --testPathIgnorePatterns "tests/integration/tools/mongodb" --testPathIgnorePatterns "tests/integration/[^/]+\.ts" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
drive-by
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
node-version-file: package.json | ||
cache: "npm" | ||
- name: Install dependencies & build | ||
run: npm ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you're looking for npm ci --omit=dev
- name: Install dependencies & build | ||
run: npm ci |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nit] Is this not redundant considering we're removing node_modules and then running npm install
again?
Might be worth considering https://www.npmjs.com/package/depcheck which is what we use in mongosh |
fixes #154
this test is basically:
dist
folder