feat(search): Add a new tool to list search and vector search indexes MCP-235 #29
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Code Health | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
permissions: {} | |
jobs: | |
run-tests: | |
name: Run MongoDB tests | |
if: github.event_name == 'push' || (github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository) | |
strategy: | |
matrix: | |
# we use macos-13 instead of macos-latest because GHA runners on ARM do not support docker | |
# see https://github.com/docker/setup-docker-action/pull/53 | |
os: [ubuntu-latest, macos-13, windows-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: GitHubSecurityLab/actions-permissions/monitor@v1 | |
if: matrix.os == 'ubuntu-latest' | |
- uses: actions/checkout@v5 | |
- uses: docker/setup-docker-action@v4 | |
name: Setup Docker Environment | |
with: | |
set-host: true | |
- uses: actions/setup-node@v5 | |
with: | |
node-version-file: package.json | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
run: npm test | |
- name: Upload test results | |
if: always() && matrix.os == 'ubuntu-latest' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results | |
path: coverage/lcov.info | |
run-atlas-tests: | |
name: Run Atlas tests | |
if: github.event_name == 'push' || (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@v5 | |
- uses: docker/setup-docker-action@v4 | |
name: Setup Docker Environment | |
with: | |
set-host: true | |
- uses: actions/setup-node@v5 | |
with: | |
node-version-file: package.json | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests | |
env: | |
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 -- tests/integration/tools/atlas | |
- name: Upload test results | |
uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: atlas-test-results | |
path: coverage/lcov.info | |
coverage: | |
name: Report Coverage | |
if: always() && (github.event_name == 'push' || (github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository)) | |
runs-on: ubuntu-latest | |
needs: [run-tests, run-atlas-tests] | |
steps: | |
- uses: actions/checkout@v5 | |
- uses: actions/setup-node@v5 | |
with: | |
node-version-file: package.json | |
cache: "npm" | |
- name: Install dependencies | |
run: npm ci | |
- name: Download test results | |
uses: actions/download-artifact@v5 | |
with: | |
name: test-results | |
path: coverage/mongodb | |
- name: Download atlas test results | |
uses: actions/download-artifact@v5 | |
with: | |
name: atlas-test-results | |
path: coverage/atlas | |
- name: Merge coverage reports | |
run: | | |
npx -y [email protected] "coverage/*/lcov.info" "coverage/lcov.info" | |
- name: Coveralls GitHub Action | |
uses: coverallsapp/[email protected] | |
with: | |
file: coverage/lcov.info |