-
Notifications
You must be signed in to change notification settings - Fork 1.2k
54 lines (48 loc) 路 1.37 KB
/
test.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
49
50
51
52
53
54
on:
workflow_call:
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [12.x, 14.x, 16.x, 18.x]
redis: ['2', '6']
steps:
- name: Git checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- name: Start Redis
uses: supercharge/redis-github-action@1.4.0
with:
redis-version: ${{ matrix.redis }}
- run: npm install
- run: npm run lint
- run: npm run build
- run: npm run test:tsd
- run: npm run test:cov || npm run test:cov || npm run test:cov
- name: Coveralls
if: matrix.node == '18.x' && matrix.redis == '6'
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: redis-${{matrix.redis}}-node-${{matrix.node}}
parallel: true
test-cluster:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build and test cluster
run: bash test/cluster/docker/main.sh
code-coverage:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true