{"repo":"supercharge/mongodb-github-action","free":true,"listed":false,"github":"https://github.com/supercharge/mongodb-github-action","clone":"git clone https://github.com/supercharge/mongodb-github-action.git","description":"Use MongoDB in GitHub Actions","language":"Shell","stars":248,"topics":["mongodb","mongodb-server","github-actions","github-actions-docker","supercharge"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"MongoDB in GitHub Actions Start a MongoDB server in your GitHub Actions. Usage Follow @marcuspoehls and @superchargejs for updates! --- Introduction This GitHub Action starts a MongoDB server or MongoDB replica set. By default, the MongoDB server is available on the default port 27017 . You can configure a custom port using the mongodb-port input. The examples show how to use a custom port. The MongoDB version must be specified using the mongodb-version input. The used version must exist in the published mongo Docker hub tags. Default value is latest , other popular choices are 6.0 , 7.0 or even release candidates 8.0.0-rc4 . This is useful when running tests against a MongoDB database. Usage A code example says more than a 1000 words. Here’s an exemplary GitHub Action using a MongoDB server in different versions to test a Node.js app: Using a Custom MongoDB Port You can start the MongoDB instance on a custom port. Use the mongodb-port: 12345 input to configure port 12345 for MongoDB. Replace 12345 with the port you want to use in your test runs. The following example starts a MongoDB server on port 42069 : With a Replica Set (MongoDB --replSet Flag) You can run your tests against a MongoDB replica set by adding the mongodb-replica-set: your-replicate-set-name input in your action’s workflow. The value for mongodb-replica-set defines the name of your replica set. Replace your-replicate-set-name with the replica set name you want to use in your tests. The following example use","default_branch":null,"files":null,"tree":[],"storefront":"/r/supercharge","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/supercharge/mongodb-github-action/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}