diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 20eacf3..7767f24 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,21 +12,10 @@ jobs: strategy: matrix: nodejs: [ '18', '20', '22' ] - runs-on: ubuntu-latest - container: ubuntu:latest permissions: actions: write contents: read pull-requests: write - services: - mongo: - image: mongo - options: >- - --bind_ip_all --replSet rs0 - --health-cmd "echo "try { rs.status() } catch (e) { rs.initiate() }" | mongosh --quiet" - --health-interval 10s - --health-timeout 5s - --health-retries 5 steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.11.0 @@ -38,6 +27,11 @@ jobs: uses: actions/setup-node@v4 with: node-version: ${{ matrix.nodejs }} + - name: Start MongoDB + uses: supercharge/mongodb-github-action@1.11.0 + with: + mongodb-version: '6.0' + mongodb-replica-set: rs0 - run: npm install -g yarn@1.22.22 - run: yarn install --frozen-lockfile - run: yarn test