-
Notifications
You must be signed in to change notification settings - Fork 80
48 lines (41 loc) · 1.03 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:
matrix:
node-version: [14, 16, 18]
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@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: Cache dependencies
uses: c-hive/gha-npm-cache@v1
- name: Update npm
run: npm install --global npm
- name: Install packages
run: npm ci
- name: Run all tests
run: npm run test:coverage
- name: Upload to Codecov
uses: codecov/codecov-action@v3