Skip to content

Node.js based forum software built for the modern web

test: add healthcheck to mongodb

Barış Soner Uşaklıc8c2b24dd434
diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index e4b50e0692..4571a8e855 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -79,6 +79,12 @@ jobs:
ports:
# Maps port 27017 on service container to the host
- 27017:27017
+ # set health checks to wait until mongo has started
+ options: >-
+ --health-cmd "mongosh --eval 'db.runCommand({ ping: 1 })' --quiet"
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5
steps:
- uses: actions/checkout@v7