Skip to content

Releases: DigiPie/mongo-action

[email protected]

13 Feb 16:14
Compare
Choose a tag to compare

mongo-action

GitHub Actions status GitHub Releases

mongo-action is a Github Action that creates a Docker container using the official mongo image from Dockerhub.
The MongoDB server port will be published/exposed to the host running the Github Workflow.

Inputs

image_version

Optional. The mongo Docker image version to use. Defaults to latest. Refer to the official Dockerhub image page.

port

Optional. The port where the mongo service will be published at (i.e. docker run -p ${port}:27017). Defaults to 27017. Refer to the official docker run page.

Example usage with mongosh

name: mongo-action CI
on: [push]

jobs:
  test_mongo_action:
    runs-on: ubuntu-latest
    name: Test mongo-action
    steps:
      - name: Create mongo Docker container
        uses: DigiPie/[email protected]
        with:
          image_version: latest
          port: 27017
      - name: Install mongosh command
        run: |
          sudo apt-get update
          sudo apt-get install -y wget gnupg
          wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
          echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
          sudo apt-get update
          sudo apt-get install -y mongodb-mongosh
      - name: Test mongo connection
        run: "sudo mongosh localhost:27017"

Example usage with NodeJS-ExpressJS

Refer to DigiPie/mocha-chai-mongoose for how you could use mongo-action with Mocha and Chai to perform automated API testing for a NodeJS-ExpressJS-Mongoose app.

[email protected]

08 Feb 14:14
Compare
Choose a tag to compare

mongo-action

GitHub Actions status GitHub Releases

mongo-action is a Github Action which creates a mongo Docker container using the official Dockerhub image. The MongoDB instance's port will be exposed to other containers and also to the host running the Github Workflow.

Inputs

image_version

Optional: The mongo Docker image version to use. Default: "latest". Refer to the official Dockerhub image page.

port

Optional: The mongo port to use. Default: 27017.

Example usage

name: mongo-action CI
on: [push]

jobs:
  test_mongo_action:
    runs-on: ubuntu-latest
    name: Test mongo-action
    steps:
      - name: Install mongosh
        run: |
          sudo apt-get update
          sudo apt-get install -y wget gnupg
          wget -qO - https://www.mongodb.org/static/pgp/server-6.0.asc | sudo apt-key add -
          echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu jammy/mongodb-org/6.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-6.0.list
          sudo apt-get update
          sudo apt-get install -y mongodb-mongosh
      - name: Create mongo Docker container
        uses: DigiPie/[email protected]
        with:
          image_version: latest
          port: 27017
      - name: Test mongo connection
        run: "sudo mongosh localhost:27017"

Example usage with NodeJS-ExpressJS

Visit DigiPie/mocha-chai-mongoose for an example of how you can use mongo-action with Mocha and Chai to perform automated API testing for a Node-ExpressJS-Mongoose app.

[email protected]

17 Jan 06:05
Compare
Choose a tag to compare

mongo-action

GitHub Actions status GitHub Releases

mongo-action is a Github Action which creates a mongo Docker container using the official Dockerhub image. The MongoDB instance's port will be exposed to other containers and also to the host running the Github Workflow.

Inputs

image-version

Optional: The mongo Docker image version to use. Default: "latest". Refer to the official Dockerhub image page.

port

Optional: The mongo port to use. Default: 27017.

Example usage

on: [push]

jobs:
  test_mongo_action:
    runs-on: ubuntu-latest
    name: Test mongo-action
    steps:
      - name: Create mongo Docker container
        id: build_mongo_docker
        uses: DigiPie/[email protected]
        with:
          image-version: latest
          port: 27017
      - name: Test mongo connection
        id: test_mongo_connection
        run: "sudo mongo localhost:27017"

Example usage with NodeJS-ExpressJS

Visit DigiPie/mocha-chai-mongoose for an example of how you can use mongo-action with Mocha and Chai to perform automated API testing for a Node-ExpressJS-Mongoose app.

[email protected]

06 Mar 14:07
Compare
Choose a tag to compare

mongo-action

GitHub Actions status GitHub Releases

mongo-action is a Github Action which creates a mongo Docker container using the official Dockerhub image. The MongoDB instance's port will be exposed to other containers and also to the host running the Github Workflow.

Inputs

image-version

Optional: The mongo Docker image version to use. Default: "latest".

port

Optional: The mongo port to use. Default: 27017.

Example usage

on: [push]

jobs:
  test_mongo_action:
    runs-on: ubuntu-latest
    name: Test mongo-action
    steps:
      - name: Create mongo Docker container
        id: build_mongo_docker
        uses: DigiPie/[email protected]
        with:
          image-version: latest
          port: 27017
      - name: Install mongodb-clients
        id: install_mongodb_clients
        run: sudo apt install mongodb-clients
      - name: Test mongo connection
        id: test_mongo_connection
        run: "sudo mongo localhost:27017"

Example usage with NodeJS-ExpressJS

Visit DigiPie/mocha-chai-mongoose for an example of how you can use mongo-action with Mocha and Chai to perform automated API testing for a Node-ExpressJS-Mongoose app.