-
Notifications
You must be signed in to change notification settings - Fork 81
48 lines (41 loc) · 1.01 KB
/
ci.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: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
jobs:
test-all:
name: Test All
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [18, 20]
services:
redis:
image: redis/redis-stack-server:latest
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli PING"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Update npm
run: npm install --global npm
if: ${{ matrix.node-version <= 14 }}
- name: Install packages
run: npm ci
- name: Run all tests
run: npm run test:coverage
- name: Upload to Codecov
uses: codecov/codecov-action@v3