Skip to content

Commit e565e2c

Browse files
committed
chore: drop corepack
1 parent d21e06a commit e565e2c

File tree

2 files changed

+18
-118
lines changed

2 files changed

+18
-118
lines changed

.github/workflows/ci.yml

Lines changed: 16 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: CI
33
on:
44
push:
55
branches:
6-
- v9
6+
- v10
77
pull_request:
88
branches:
9-
- v9
9+
- v10
1010
permissions:
1111
contents: read
1212
env:
@@ -27,8 +27,8 @@ jobs:
2727
- name: Checkout codes
2828
uses: actions/checkout@v4
2929

30-
- name: Enable corepack
31-
run: corepack enable
30+
- name: Install pnpm
31+
uses: pnpm/action-setup@v4
3232

3333
- name: Setup node
3434
uses: actions/setup-node@v4
@@ -55,8 +55,8 @@ jobs:
5555
- name: Checkout codes
5656
uses: actions/checkout@v4
5757

58-
- name: Enable corepack
59-
run: corepack enable
58+
- name: Install pnpm
59+
uses: pnpm/action-setup@v4
6060

6161
- name: Setup node
6262
uses: actions/setup-node@v4
@@ -70,29 +70,29 @@ jobs:
7070
- name: Build codes
7171
run: |
7272
pnpm build --all -t
73-
node -r esbuild-register scripts/postprocess.ts
73+
npx tsx ./scripts/postprocess.ts
7474
7575
- name: Cache dist
7676
uses: actions/cache@v4
7777
with:
7878
path: packages/*/dist
79-
key: build-vue-i18n-next-os-${{ matrix.os }}-${{ github.sha }}
79+
key: build-vue-i18n-os-${{ matrix.os }}-${{ github.sha }}
8080

8181
test-unit:
8282
name: Unit test
8383
strategy:
8484
matrix:
8585
os: [ubuntu-latest, windows-latest, macos-latest]
86-
node: [18.19, 20]
86+
node: [18.19, 20, 22]
8787

8888
runs-on: ${{ matrix.os }}
8989

9090
steps:
9191
- name: Checkout codes
9292
uses: actions/checkout@v4
9393

94-
- name: Enable corepack
95-
run: corepack enable
94+
- name: Install pnpm
95+
uses: pnpm/action-setup@v4
9696

9797
- name: Setup node
9898
uses: actions/setup-node@v4
@@ -107,34 +107,6 @@ jobs:
107107
run: |
108108
pnpm test:cover
109109
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-
138110
test-e2e:
139111
name: E2E test
140112

@@ -144,16 +116,16 @@ jobs:
144116
strategy:
145117
matrix:
146118
os: [ubuntu-latest, windows-latest, macos-latest]
147-
node: [18.19, 20]
119+
node: [18.19, 20, 22]
148120

149121
runs-on: ${{ matrix.os }}
150122

151123
steps:
152124
- name: Checkout codes
153125
uses: actions/checkout@v4
154126

155-
- name: Enable corepack
156-
run: corepack enable
127+
- name: Install pnpm
128+
uses: pnpm/action-setup@v4
157129

158130
- name: Setup node
159131
uses: actions/setup-node@v4
@@ -164,86 +136,14 @@ jobs:
164136
- name: Install dependencies
165137
run: pnpm install --no-frozen-lockfile
166138

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-
184139
- 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
187141

188142
- name: Restore dist cache
189143
uses: actions/cache@v4
190144
with:
191145
path: packages/*/dist
192-
key: build-vue-i18n-next-os-${{ matrix.os }}-${{ github.sha }}
146+
key: build-vue-i18n-os-${{ matrix.os }}-${{ github.sha }}
193147

194148
- name: Run e2e tests
195149
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}}

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
with:
2222
ref: ${{ github.head_ref }}
2323

24-
- name: Enable corepack
25-
run: corepack enable
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v4
2626

2727
- name: Setup Node
2828
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)