-
-
Notifications
You must be signed in to change notification settings - Fork 39
107 lines (88 loc) · 2.26 KB
/
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
name: 'ci'
on:
push:
branches:
- '**'
paths-ignore:
- docs/**
- docs-playground/**
- playgrounds/**
- scripts
pull_request:
branches:
- main
- "!v[0-9]*"
paths-ignore:
- docs/**
- docs-playground/**
- playgrounds/**
- scripts
jobs:
unit-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- run: corepack enable
- name: Set node version to 18
uses: actions/[email protected]
with:
node-version: 18
cache: "pnpm"
- name: Install pnpm
uses: pnpm/action-setup@v2
- run: pnpm i
- run: pnpm run build:stub
- run: pnpm run build:ci
- name: Run unit tests
run: pnpm run test
coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- run: corepack enable
- name: Set node version to 18
uses: actions/[email protected]
with:
node-version: 18
cache: "pnpm"
- run: pnpm i
- run: pnpm run build:stub
- run: pnpm run build:ci
- name: Run test coverage
run: pnpm run test:coverage
- name: Publish coverage
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./packages
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- run: corepack enable
- name: Set node version to 18
uses: actions/[email protected]
with:
node-version: 18
cache: "pnpm"
- run: pnpm i
- run: pnpm run build:stub
- run: pnpm run build:ci
- name: Run eslint
run: pnpm run lint
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- run: corepack enable
- name: Set node version to 18
uses: actions/[email protected]
with:
node-version: 18
cache: "pnpm"
- run: pnpm i
- run: pnpm run build:stub
- run: pnpm run build:ci
- run: pnpm run size