-
-
Notifications
You must be signed in to change notification settings - Fork 5
54 lines (45 loc) · 1.12 KB
/
Copy pathunit-test.yml
File metadata and controls
54 lines (45 loc) · 1.12 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
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:
- 22
- 24
- 26
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup pnpm
uses: pnpm/setup@v2
with:
runtime: node@^24.20.0
- name: Install Deps
run: pnpm ci
- name: Build project
run: pnpm run build
- name: Unit test and save results
env:
TEST_REPORT: ${{ matrix.node-version == 24 && 'true' || '' }}
run: pnpm run test
- name: Upload test results
if: ${{ !cancelled() && matrix.node-version == 24 }}
uses: codecov/codecov-action@v7
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@v7
with:
use_oidc: true