@@ -3,10 +3,10 @@ name: CI
3
3
on :
4
4
push :
5
5
branches :
6
- - v9
6
+ - v10
7
7
pull_request :
8
8
branches :
9
- - v9
9
+ - v10
10
10
permissions :
11
11
contents : read
12
12
env :
27
27
- name : Checkout codes
28
28
uses : actions/checkout@v4
29
29
30
- - name : Enable corepack
31
- run : corepack enable
30
+ - name : Install pnpm
31
+ uses : pnpm/action-setup@v4
32
32
33
33
- name : Setup node
34
34
uses : actions/setup-node@v4
55
55
- name : Checkout codes
56
56
uses : actions/checkout@v4
57
57
58
- - name : Enable corepack
59
- run : corepack enable
58
+ - name : Install pnpm
59
+ uses : pnpm/action-setup@v4
60
60
61
61
- name : Setup node
62
62
uses : actions/setup-node@v4
@@ -70,29 +70,29 @@ jobs:
70
70
- name : Build codes
71
71
run : |
72
72
pnpm build --all -t
73
- node -r esbuild-register scripts/postprocess.ts
73
+ npx tsx ./ scripts/postprocess.ts
74
74
75
75
- name : Cache dist
76
76
uses : actions/cache@v4
77
77
with :
78
78
path : packages/*/dist
79
- key : build-vue-i18n-next- os-${{ matrix.os }}-${{ github.sha }}
79
+ key : build-vue-i18n-os-${{ matrix.os }}-${{ github.sha }}
80
80
81
81
test-unit :
82
82
name : Unit test
83
83
strategy :
84
84
matrix :
85
85
os : [ubuntu-latest, windows-latest, macos-latest]
86
- node : [18.19, 20]
86
+ node : [18.19, 20, 22 ]
87
87
88
88
runs-on : ${{ matrix.os }}
89
89
90
90
steps :
91
91
- name : Checkout codes
92
92
uses : actions/checkout@v4
93
93
94
- - name : Enable corepack
95
- run : corepack enable
94
+ - name : Install pnpm
95
+ uses : pnpm/action-setup@v4
96
96
97
97
- name : Setup node
98
98
uses : actions/setup-node@v4
@@ -107,34 +107,6 @@ jobs:
107
107
run : |
108
108
pnpm test:cover
109
109
110
- test-type :
111
- name : Type checking
112
- strategy :
113
- matrix :
114
- os : [ubuntu-latest]
115
- node : [18]
116
-
117
- runs-on : ${{ matrix.os }}
118
-
119
- steps :
120
- - name : Checkout codes
121
- uses : actions/checkout@v4
122
-
123
- - name : Enable corepack
124
- run : corepack enable
125
-
126
- - name : Setup node
127
- uses : actions/setup-node@v4
128
- with :
129
- node-version : ${{ matrix.node }}
130
- cache : ' pnpm'
131
-
132
- - name : Install dependencies
133
- run : pnpm install --no-frozen-lockfile
134
-
135
- - name : Run type checking
136
- run : pnpm test:type
137
-
138
110
test-e2e :
139
111
name : E2E test
140
112
@@ -144,16 +116,16 @@ jobs:
144
116
strategy :
145
117
matrix :
146
118
os : [ubuntu-latest, windows-latest, macos-latest]
147
- node : [18.19, 20]
119
+ node : [18.19, 20, 22 ]
148
120
149
121
runs-on : ${{ matrix.os }}
150
122
151
123
steps :
152
124
- name : Checkout codes
153
125
uses : actions/checkout@v4
154
126
155
- - name : Enable corepack
156
- run : corepack enable
127
+ - name : Install pnpm
128
+ uses : pnpm/action-setup@v4
157
129
158
130
- name : Setup node
159
131
uses : actions/setup-node@v4
@@ -164,86 +136,14 @@ jobs:
164
136
- name : Install dependencies
165
137
run : pnpm install --no-frozen-lockfile
166
138
167
- # https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L62
168
- # Install playwright's binary under custom directory to cache
169
- - name : Set Playwright path
170
- if : runner.os != 'Windows'
171
- run : echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV
172
- - name : Set Playwright path (windows)
173
- if : runner.os == 'Windows'
174
- run : echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV
175
-
176
- - name : Cache Playwright's binary
177
- uses : actions/cache@v4
178
- with :
179
- # Playwright removes unused browsers automatically
180
- # So does not need to add playwright version to key
181
- key : ${{ runner.os }}-playwright-bin-v1
182
- path : ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
183
-
184
139
- name : Install Playwright
185
- # does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
186
- run : pnpm playwright install chromium
140
+ run : pnpm playwright-core install chromium
187
141
188
142
- name : Restore dist cache
189
143
uses : actions/cache@v4
190
144
with :
191
145
path : packages/*/dist
192
- key : build-vue-i18n-next- os-${{ matrix.os }}-${{ github.sha }}
146
+ key : build-vue-i18n-os-${{ matrix.os }}-${{ github.sha }}
193
147
194
148
- name : Run e2e tests
195
149
run : pnpm test:e2e
196
-
197
- edge-release :
198
- if : |
199
- github.event_name == 'push' &&
200
- !contains(github.event.head_commit.message, '[skip-release]') &&
201
- !contains(github.event.head_commit.message, 'chore') &&
202
- !contains(github.event.head_commit.message, 'docs')
203
-
204
- needs :
205
- - lint
206
- - build
207
- - test-unit
208
- - test-type
209
- - test-e2e
210
-
211
- strategy :
212
- matrix :
213
- os : [ubuntu-latest]
214
- node : [18]
215
-
216
- runs-on : ${{ matrix.os }}
217
-
218
- steps :
219
- - name : Checkout codes
220
- uses : actions/checkout@v4
221
-
222
- - name : Enable corepack
223
- run : corepack enable
224
-
225
- - name : Setup node
226
- uses : actions/setup-node@v4
227
- with :
228
- node-version : ${{ matrix.node }}
229
- cache : ' pnpm'
230
-
231
- - name : Install dependencies
232
- run : pnpm install --no-frozen-lockfile
233
-
234
- - name : Restore dist cache
235
- uses : actions/cache@v4
236
- with :
237
- path : packages/*/dist
238
- key : build-vue-i18n-next-os-${{ matrix.os }}-${{ github.sha }}
239
-
240
- - name : Upload message-compiler dist files (debug)
241
- uses : actions/upload-artifact@v4
242
- with :
243
- name : message-compiler
244
- path : packages/message-compiler/dist
245
-
246
- - name : Release edge version
247
- run : ./scripts/release-edge.sh
248
- env :
249
- NPM_AUTH_TOKEN : ${{secrets.NPM_AUTH_TOKEN}}
0 commit comments