forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.08 KB
/
ci-test-unit.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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