Home

Awesome

setup-mongodb

The missing action for MongoDB :tada:

Build Status

Getting Started

Add it as a step to your workflow

      - uses: ankane/setup-mongodb@v1

Versions

Specify a version

      - uses: ankane/setup-mongodb@v1
        with:
          mongodb-version: 8.0

Currently supports

Version8.07.06.05.0
ubuntu-24.04default
ubuntu-22.04default
ubuntu-20.04default
macos-15default
macos-14default
macos-13default
windows-2022default
windows-2019default

Test against multiple versions

    strategy:
      matrix:
        mongodb-version: [8.0, 7.0, 6.0, 5.0]
    steps:
      - uses: ankane/setup-mongodb@v1
        with:
          mongodb-version: ${{ matrix.mongodb-version }}

Extra Steps

Run queries

      - run: mongosh --eval "db.version()"

Use mongo for MongoDB < 6

Related Actions

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help: