-
-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.27 KB
/
tests.yaml
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
---
name: Testing
# yamllint disable-line rule:truthy
on:
push:
pull_request:
workflow_dispatch:
jobs:
jest:
name: Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22]
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
- name: 🏗 Set up Node.js ${{ matrix.node-version }}
uses: actions/[email protected]
with:
node-version: ${{ matrix.node-version }}
- name: 🏗 Install dependencies
run: npm ci
- name: 🚀 Run tests
run: npm test
- name: ⬆️ Upload coverage artifact
uses: actions/[email protected]
with:
name: coverage-${{ matrix.node-version }}
path: coverage
retention-days: 1
coverage:
runs-on: ubuntu-latest
needs: jest
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/[email protected]
with:
fetch-depth: 0
- name: ⬇️ Download coverage data
uses: actions/[email protected]
- name: 🚀 Upload coverage report
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true