supercharge / mongodb-github-action

Use MongoDB in GitHub Actions
MIT License
227 stars 48 forks source link

[Feature Request] MacOS support #6

Closed crusaderky closed 3 years ago

crusaderky commented 4 years ago

It would be great to have MacOS support.

My current workaround:


name: Test

jobs:
  build:
    name: ${{ matrix.mongodb-version }} ${{ matrix.os }}
    runs-on: ${{ matrix.os }}-latest
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu, macos]
        mongodb-version: ['3.0', '3.2', '3.4', '3.6', '4.0', '4.2']
        exclude:
          # MongoDB <3.2 not available on brew
          - os: macos
            mongodb-version: '3.0'

    steps:
      - name: Start MongoDB on Linux
        if: matrix.os == 'ubuntu'
        uses: supercharge/mongodb-github-action@1.3.0
        with:
          mongodb-version: ${{ matrix.mongodb-version }}

      - name: Start MongoDB on MacOS
        if: matrix.os == 'macos'
        run: |
          brew tap mongodb/brew
          brew install mongodb-community@${{ matrix.mongodb-version }}
          brew services start mongodb-community@${{ matrix.mongodb-version }}
marcuspoehls commented 4 years ago

@crusaderky Hey, I like the idea of simplifying the MongoDB handling for different operating systems. It makes sense to abstract the individual handling into the library to work properly for Linux, macOS, and Windows. Especially when the user doesn't have to worry about the OS.

This MongoDB GitHub Action uses Docker.

crusaderky commented 4 years ago

sorry, I have no idea how GitHub Actions is working under the hood for MacOS and Windows

marcuspoehls commented 3 years ago

Closing this for now because I don’t have the time to maintain a workaround for macOS