forked from borislav-itskov/schnorrkel.js
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.04 KB
/
tests.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
name: Tests
on:
push:
branches:
- main
- develop
pull_request: {}
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Cache dependencies
id: cache_dependencies
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-dependencies-${{ hashFiles('./package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
if: steps.cache_dependencies.outputs.cache-hit != 'true'
run: npm ci
- name: Run tests
run: npm run test:coverage
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: reports/coverage/lcov.info