Using service as described here: https://www.mongodb.com/docs/atlas/cli/current/atlas-cli-deploy-docker/#run-the-image-with-github-actions
in github actions:
services:
mongodb:
image: mongodb/mongodb-atlas-local
ports:
- 27017:27017
but it always fails:
starting
mongodb service is starting, waiting 2 seconds before checking again.
/usr/bin/docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" c52ef7f4023438f1ab52d3ddc69394c62d69922474fde4e22e6f332058b263be
starting
mongodb service is starting, waiting 3 seconds before checking again.
/usr/bin/docker inspect --format="{{if .Config.Healthcheck}}{{print .State.Health.Status}}{{end}}" c52ef7f4023438f1ab52d3ddc69394c62d69922474fde4e22e6f332058b263be
unhealthy
Service container mongodb failed.
Error: Failed to initialize container mongodb/mongodb-atlas-local
Error: One or more containers failed to start.