-
Notifications
You must be signed in to change notification settings - Fork 4
47 lines (37 loc) · 943 Bytes
/
ci.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: ci
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node: [18, 20]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- run: corepack enable
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Prepare environment
run: pnpm dev:prepare
- name: Lint
run: pnpm lint
- name: Test
run: pnpm vitest run --coverage
- name: Build
run: pnpm prepack
- name: Coverage
if: ${{ matrix.os == 'ubuntu-latest' && matrix.node == 20 }}
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}