-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (48 loc) · 1.33 KB
/
ci.yml
File metadata and controls
60 lines (48 loc) · 1.33 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
59
60
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20, 22, 24]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Enable Corepack
run: corepack enable
- name: Setup pnpm via Corepack
run: corepack prepare --activate
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
if: matrix.node-version >= 20
run: pnpm lint
- name: Test
run: pnpm test:ci
- name: Generate coverage report
if: matrix.node-version == 22
run: pnpm test:cov
- name: Upload coverage to Codecov
if: matrix.node-version == 22
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage/lcov.info
fail_ci_if_error: false
verbose: true
- name: Upload coverage HTML report
if: matrix.node-version == 22
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: coverage/
retention-days: 30