Skip to content

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

Merged
merged 4 commits into from
Apr 29, 2025
Merged

ci: test to check dependencies #160

merged 4 commits into from
Apr 29, 2025

Conversation

fmenezes
Copy link
Collaborator

@fmenezes fmenezes commented Apr 29, 2025

fixes #154

this test is basically:

  1. compile dist folder
  2. remove all dev dependencies
  3. try to use mcp server

@fmenezes fmenezes marked this pull request as ready for review April 29, 2025 11:36
@Copilot Copilot AI review requested due to automatic review settings April 29, 2025 11:36
@fmenezes fmenezes requested a review from a team as a code owner April 29, 2025 11:36
Copy link
Contributor

@Copilot Copilot AI left a 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"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

drive-by

Copy link
Collaborator

@blva blva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@fmenezes fmenezes merged commit 73c0ccf into main Apr 29, 2025
16 checks passed
@fmenezes fmenezes deleted the fmenezes/check_dep branch April 29, 2025 11:45
node-version-file: package.json
cache: "npm"
- name: Install dependencies & build
run: npm ci
Copy link
Collaborator

@gagik gagik Apr 29, 2025

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

Comment on lines +76 to +77
- name: Install dependencies & build
run: npm ci
Copy link
Collaborator

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?

@gagik
Copy link
Collaborator

gagik commented Apr 29, 2025

Might be worth considering https://www.npmjs.com/package/depcheck which is what we use in mongosh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test missing dependencies
4 participants