diff --git a/.github/workflows/lint.yml b/.github/workflows/check.yml similarity index 53% rename from .github/workflows/lint.yml rename to .github/workflows/check.yml index c40fb689..71a5b657 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/check.yml @@ -1,10 +1,13 @@ --- -name: Lint +name: Checks on: push: branches: - main pull_request: + pull_request_target: + branches: + - main permissions: {} @@ -35,3 +38,21 @@ jobs: - name: Install dependencies run: npm ci - run: npm run generate + + check-dep: + name: Check dependencies + runs-on: ubuntu-latest + steps: + - uses: GitHubSecurityLab/actions-permissions/monitor@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: package.json + cache: "npm" + - name: Install dependencies, build and remove dev dependencies + run: | + npm ci + rm -rf node_modules + npm pkg set scripts.prepare="exit 0" + npm install --omit=dev + - run: npx -y @modelcontextprotocol/inspector --cli --method tools/list -- node dist/index.js --connectionString "mongodb://localhost" diff --git a/.github/workflows/code_health.yaml b/.github/workflows/code_health.yaml index 1451f36e..2f8ed17a 100644 --- a/.github/workflows/code_health.yaml +++ b/.github/workflows/code_health.yaml @@ -62,26 +62,6 @@ jobs: name: atlas-test-results path: coverage/lcov.info - dep-check: - name: Check dependencies - if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository - runs-on: ubuntu-latest - steps: - - uses: GitHubSecurityLab/actions-permissions/monitor@v1 - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version-file: package.json - cache: "npm" - - name: Install dependencies & build - run: npm ci - - name: Remove dev dependencies - run: | - rm -rf node_modules - npm pkg set scripts.prepare="exit 0" - npm install --omit=dev - - run: npx -y @modelcontextprotocol/inspector --cli --method tools/list -- node dist/index.js --connectionString "mongodb://localhost" - coverage: name: Report Coverage if: always() && github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository diff --git a/.github/workflows/code_health_fork.yaml b/.github/workflows/code_health_fork.yaml index 915d271c..3704ddbc 100644 --- a/.github/workflows/code_health_fork.yaml +++ b/.github/workflows/code_health_fork.yaml @@ -42,8 +42,6 @@ jobs: permissions: pull-requests: write contents: write - needs: - - run-tests steps: - name: Enable auto-merge for Dependabot PRs run: gh pr merge --auto --squash "$PR_URL"