From df146af3eda0be2be4c1509a584e2f2db6d1e4ac Mon Sep 17 00:00:00 2001 From: Pierre Brisorgueil Date: Sun, 25 Sep 2022 19:04:32 +0200 Subject: [PATCH] Update CI.yml --- .github/workflows/CI.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c25e5687f..26171feaa 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -14,14 +14,23 @@ jobs: matrix: node-version: [16.x, 18.x] + services: + mongodb: + image: mongo + options: >- + --health-cmd mongo + --health-interval 10s + --health-timeout 5s + --health-retries 5 + ports: + - 27017:27017 + steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - - name: Start Docker for Mongodb - run: docker run -d -p 27017:27017 mongo - name: Run tests run: | npm i