-
-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (48 loc) · 1.25 KB
/
Copy pathunit-test.yml
File metadata and controls
58 lines (48 loc) · 1.25 KB
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
50
51
52
53
54
55
56
57
58
name: Unit Test
on:
push:
pull_request:
permissions:
contents: read
id-token: write
jobs:
linter-and-unit:
name: Unit test
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version:
- 20
- 22
- 24
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: pnpm
- name: Install Deps
run: pnpm install --frozen-lockfile
- name: Build project
run: pnpm build
- name: Unit test and save results
env:
TEST_REPORT: ${{ matrix.node-version == 24 && 'true' || '' }}
run: pnpm test
- name: Upload test results
if: ${{ !cancelled() && matrix.node-version == 24 }}
uses: codecov/codecov-action@v5
with:
use_oidc: true
files: ./coverage/test-report.junit.xml
report_type: test_results
- name: Upload coverage
if: ${{ !cancelled() && matrix.node-version == 24 }}
uses: codecov/codecov-action@v5
with:
use_oidc: true