Skip to content

Commit 0c9636c

Browse files
committed
Add workflow to test code coverage
1 parent 7c6c073 commit 0c9636c

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

.github/workflows/run-coverage.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# This workflow will do a clean installation of node dependencies and run code coverage across different versions of node
2+
3+
name: Run Code Coverage
4+
5+
on: [push, pull_request]
6+
7+
jobs:
8+
build:
9+
10+
runs-on: ubuntu-latest
11+
12+
strategy:
13+
matrix:
14+
node-version: [16.x, 18.x]
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 2
21+
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v3
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
27+
- name: Install dependencies
28+
run: npm install
29+
30+
- name: Run the tests
31+
run: npm test -- --coverage

.github/workflows/node.js.yml renamed to .github/workflows/run-tests.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ jobs:
1919
redis-version: [4, 5, 6]
2020

2121
steps:
22-
- uses: actions/checkout@v3
22+
- name: Checkout repository
23+
uses: actions/checkout@v3
24+
2325
- name: Use Node.js ${{ matrix.node-version }}
2426
uses: actions/setup-node@v3
2527
with:
@@ -30,6 +32,8 @@ jobs:
3032
with:
3133
redis-version: ${{ matrix.redis-version }}
3234

33-
- run: npm install
35+
- name: Install dependencies
36+
run: npm install
3437

35-
- run: npm run test
38+
- name: Run the tests
39+
run: npm run test

0 commit comments

Comments
 (0)