18
18
- " .github/workflows/ci.yml"
19
19
20
20
env :
21
- CI : true
21
+ default_node_version : " lts/*"
22
+ default_pnpm_version : 8
22
23
23
24
jobs :
24
25
lint :
26
+ name : Lint
25
27
runs-on : ubuntu-latest
26
28
steps :
27
29
- uses : actions/checkout@v4
28
30
with :
29
31
submodules : " recursive"
30
32
33
+ - uses : pnpm/action-setup@v2
34
+ name : Install pnpm
35
+ with :
36
+ version : ${{env.default_pnpm_version}}
37
+
31
38
- uses : actions/setup-node@v4
32
39
with :
33
- node-version : " lts/*"
40
+ node-version : ${{env.default_node_version}}
41
+ cache : pnpm
42
+
43
+ - name : Install Dependencies
44
+ run : pnpm i
45
+
46
+ - name : Lint
47
+ run : |
48
+ pnpm run lint
49
+
50
+ type :
51
+ name : Type Check
52
+ runs-on : ubuntu-latest
53
+ steps :
54
+ - uses : actions/checkout@v4
34
55
35
56
- uses : pnpm/action-setup@v2
36
57
name : Install pnpm
37
58
with :
38
- version : 8
59
+ version : ${{env.default_pnpm_version}}
39
60
40
- - name : Get pnpm store directory
41
- shell : bash
42
- run : |
43
- echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
44
-
45
- - uses : actions/cache@v4
46
- name : Setup pnpm cache
61
+ - uses : actions/setup-node@v4
47
62
with :
48
- path : |
49
- ${{ env.STORE_PATH }}
50
- key : ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
51
- restore-keys : |
52
- ${{ runner.os }}-pnpm-store-
63
+ node-version : ${{env.default_node_version}}
64
+ cache : pnpm
53
65
54
66
- name : Install Dependencies
55
67
run : pnpm i
56
68
57
69
- name : Lint
58
70
run : |
59
- pnpm run lint
71
+ pnpm run lint:type
60
72
61
73
build :
74
+ name : Build
62
75
uses : ./.github/workflows/build.yml
63
76
64
77
test-ve :
78
+ name : test-ve
65
79
needs : build
66
80
runs-on : ${{ matrix.os }}
67
81
services :
@@ -84,15 +98,15 @@ jobs:
84
98
with :
85
99
name : artifact
86
100
87
- - uses : actions/setup-node@v4
88
- with :
89
- node-version : " lts/*"
90
-
91
101
- uses : pnpm/action-setup@v2
92
102
name : Install pnpm
93
103
if : ${{ matrix.pm == 'pnpm' }}
94
104
with :
95
- version : 8
105
+ version : ${{env.default_pnpm_version}}
106
+
107
+ - uses : actions/setup-node@v4
108
+ with :
109
+ node-version : ${{env.default_node_version}}
96
110
97
111
- name : login to 'verdaccio'
98
112
run : npx npm-cli-login -u test -p 1234 -e test@domain.test -r http://localhost:4873
@@ -117,6 +131,7 @@ jobs:
117
131
${{ matrix.pm }} create hexo
118
132
119
133
test-ln :
134
+ name : test-ln
120
135
needs : build
121
136
runs-on : ${{ matrix.os }}
122
137
strategy :
@@ -134,15 +149,15 @@ jobs:
134
149
with :
135
150
name : artifact
136
151
137
- - uses : actions/setup-node@v4
138
- with :
139
- node-version : " lts/*"
140
-
141
152
- uses : pnpm/action-setup@v2
142
153
name : Install pnpm
143
154
if : ${{ matrix.pm == 'pnpm' }}
144
155
with :
145
- version : 8
156
+ version : ${{env.default_pnpm_version}}
157
+
158
+ - uses : actions/setup-node@v4
159
+ with :
160
+ node-version : ${{env.default_node_version}}
146
161
147
162
- name : config for test
148
163
run : |
0 commit comments