name: Tests Unit on: workflow_call: inputs: node-version: required: true type: string mongodb-version: default: "['4.4', '6.0']" required: false type: string env: MONGO_URL: mongodb://localhost:27017/rocketchat?replicaSet=rs0&directConnection=true TOOL_NODE_FLAGS: ${{ vars.TOOL_NODE_FLAGS }} jobs: test: runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: mongodb-version: ${{ fromJSON(inputs.mongodb-version) }} name: MongoDB ${{ matrix.mongodb-version }} steps: - name: Launch MongoDB uses: supercharge/mongodb-github-action@1.9.0 with: mongodb-version: ${{ matrix.mongodb-version }} mongodb-replica-set: rs0 - uses: actions/checkout@v3 - name: Setup NodeJS uses: ./.github/actions/setup-node with: node-version: ${{ inputs.node-version }} cache-modules: true install: true - uses: dtinth/setup-github-actions-caching-for-turbo@v1 - name: Unit Test run: yarn testunit