
Security News
ECMAScript 2025 Finalized with Iterator Helpers, Set Methods, RegExp.escape, and More
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
mongodb-ci-checker
Advanced tools
The MongoDB CI Checker checks whether the GitHub CI workflow test environments use the latests MongoDB versions.
npm install --save-dev mongodb-ci-checker
package.json
:"scripts": {
"mongodb:ci:checker": "node ./node_modules/mongodb-ci-checker/lib",
...
},
mongodb-ci-checker:
name: MongoDB CI Checker
timeout-minutes: 30
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 10
- name: Install dependencies
run: npm ci
- name: Run MongoDB CI Checker
run: npm run mongodb:ci:checker
env:
MONGODB_CI_CHECKER_VERSION_KEY: [...]
MONGODB_CI_CHECKER_ENV_KEY_PATH: [...]
MONGODB_CI_CHECKER_YAML_PATH: [...]
MONGODB_CI_CHECKER_IGNORE_VERSIONS: [...]
The check is configured via environment variables in the GitHub workflow YAML file:
Environment Variable | Type | Optional | Default | Example Value | Description |
---|---|---|---|---|---|
MONGODB_CI_CHECKER_VERSION_KEY | String | 'MONGODB_VERSION' | The name of the environment variable which sets the MongoDB version used for tests. | ||
MONGODB_CI_CHECKER_ENV_KEY_PATH | String | 'jobs.tests.strategy.matrix.include' | The YAML key path to the list of environments which should be checked. | ||
MONGODB_CI_CHECKER_YAML_PATH | String | './.github/workflows/ci.yml' | The file path to the GitHub CI YAML file. | ||
MONGODB_CI_CHECKER_IGNORE_VERSIONS | Array<String> | yes | [] | '["~4.7.0","<4.0.0"]' | The versions to ignore when checking the versions of MongoDB; accepts semver notation. |
This is an example configuration, where for each of the test environments the MongoDB CI Checker will ensure that the MONGODB_VERSION
set as environment variable is the latest available patch version and there are environments that cover all recent MongoDB versions.
name: CI
on: push
jobs:
mongodb-ci-checker:
name: MongoDB CI Checker
timeout-minutes: 30
runs-on: ubuntu-18.04
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Set-up node
uses: actions/setup-node@v1
with:
node-version: 10
- name: Install dependencies
run: npm ci
- name: Run MongoDB CI Checker
run: npm run mongodb:ci:checker
env:
MONGODB_CI_CHECKER_VERSION_KEY: 'MONGODB_VERSION'
MONGODB_CI_CHECKER_ENV_KEY_PATH: 'jobs.tests.strategy.matrix.include'
MONGODB_CI_CHECKER_YAML_PATH: './github/workflow/ci.yaml'
MONGODB_CI_CHECKER_IGNORE_VERSIONS: '["~4.7.0"]'
tests:
strategy:
matrix:
include:
- name: Test Environment Mongo 4.4
MONGODB_VERSION: 4.4.3
- name: Test Environment Mongo 4.2
MONGODB_VERSION: 4.2.12
- name: Test Environment Mongo 4.0
MONGODB_VERSION: 4.0.22
name: ${{ matrix.name }}
env:
MONGODB_VERSION: ${{ matrix.MONGODB_VERSION }}
timeout-minutes: 30
runs-on: ubuntu-18.04
steps:
steps:
- name: Checkout branch
uses: actions/checkout@v2
- name: Set-up node
uses: actions/setup-node@v1
with:
node-version: 10
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm test
As defined above, the tests will be executed in environments with the following MongoDB versions:
4.4.3
4.2.12
4.0.22
The MongoDB CI Check will fail, if:
4.4.4
, 4.2.13
or 4.0.23
.4.5.x
.5.x.x
.The MongoDB CI Check will not fail, if:
4.7.x
available because it is excluded in MONGODB_CI_CHECKER_IGNORE_VERSIONS
.<4.0.0
because versions below the smallest defined minor version 4.0.22
are automatically ignored.Note:
x.y.z-rc0
) or alpha/beta versions (x.y.z-alpha01
) are ignored.FAQs
MongoDB CI Checker
The npm package mongodb-ci-checker receives a total of 2 weekly downloads. As such, mongodb-ci-checker popularity was classified as not popular.
We found that mongodb-ci-checker demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.
Research
North Korean threat actors linked to the Contagious Interview campaign return with 35 new malicious npm packages using a stealthy multi-stage malware loader.