ankane / setup-mongodb

The missing action for MongoDB

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setup-mongodb

The missing action for MongoDB πŸŽ‰

  • Faster (with the default version) and simpler than containers
  • Works on Linux, Mac, and Windows
  • Supports different versions

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: 7.0

Currently supports

Version 7.0 6.0 5.0 4.4
ubuntu-22.04 βœ“ default
ubuntu-20.04 βœ“ βœ“ default
macos-14 βœ“ βœ“ default βœ“
macos-13 βœ“ βœ“ default βœ“
macos-12 βœ“ βœ“ default βœ“
macos-11 βœ“ βœ“ default βœ“
windows-2022 default
windows-2019 default

Test against multiple versions

    strategy:
      matrix:
        mongodb-version: [7.0, 6.0, 5.0, 4.4]
    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:

About

The missing action for MongoDB

License:MIT License


Languages

Language:JavaScript 100.0%