Skip to content

chore: add Node.js 22 and MongoDB 7.0 to test matrix #432

chore: add Node.js 22 and MongoDB 7.0 to test matrix

chore: add Node.js 22 and MongoDB 7.0 to test matrix #432

Workflow file for this run

name: Node.js CI
on:
push:
branches:
- main
pull_request:
jobs:
test:
timeout-minutes: 10
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x, 22.x]
mongo-version: ['5.0', '6.0', '7.0']
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Use MongoDB ${{ matrix.mongo-version }}
run: echo "MONGO_VERSION=${{ matrix.mongo-version }}" > .env
- name: Init docker
run: docker-compose up -d
- name: Install dependencies
run: npm install
- name: Initialize MongoDB
run: node reset-dev.mjs
- name: Run tests
run: npm run test-only
- name: Send coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Teardown docker
run: docker-compose down