diff --git a/.github/workflows/code_health.yaml b/.github/workflows/code_health.yaml index 2f8ed17a..5505ec67 100644 --- a/.github/workflows/code_health.yaml +++ b/.github/workflows/code_health.yaml @@ -11,7 +11,7 @@ permissions: {} jobs: run-tests: name: Run MongoDB tests - if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository + 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: os: [ubuntu-latest, macos-latest, windows-latest] @@ -38,7 +38,7 @@ jobs: run-atlas-tests: name: Run Atlas tests - if: github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository + 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 @@ -64,7 +64,7 @@ jobs: coverage: name: Report Coverage - if: always() && github.event.pull_request.user.login != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository + 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: diff --git a/tests/integration/indexCheck.test.ts b/tests/integration/indexCheck.test.ts index c6cc003e..70f53ed5 100644 --- a/tests/integration/indexCheck.test.ts +++ b/tests/integration/indexCheck.test.ts @@ -191,7 +191,6 @@ describe("IndexCheck integration tests", () => { collection: "aggregate-test-collection", pipeline: [ { $match: { category: "A" } }, // Now has index - { $group: { _id: "$category", count: { $sum: 1 } } }, ], }, }); @@ -308,7 +307,7 @@ describe("IndexCheck integration tests", () => { expect(response.isError).toBeFalsy(); const content = getResponseContent(response.content); expect(content).toContain("Deleted"); - expect(content).toMatch(/\d+ document\(s\)/); + expect(content).toMatch(/`\d+` document\(s\)/); }); }); }, diff --git a/tests/integration/tools/mongodb/mongodbHelpers.ts b/tests/integration/tools/mongodb/mongodbHelpers.ts index ca4b09c1..935b27db 100644 --- a/tests/integration/tools/mongodb/mongodbHelpers.ts +++ b/tests/integration/tools/mongodb/mongodbHelpers.ts @@ -70,6 +70,7 @@ export function setupMongoDBIntegrationTest(): MongoDBIntegrationTest { tmpDir: dbsDir, logDir: path.join(tmpDir, "mongodb-runner", "logs"), topology: "standalone", + version: "8.0.10", }); return;