@@ -42,27 +42,28 @@ jobs:
4242 - name : Checkout codes
4343 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
4444
45+ - name : Install pnpm
46+ uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
47+
4548 - name : Setup deno
4649 uses : denoland/setup-deno@v1
4750 with :
4851 deno-version : v1.x
4952
5053 - name : Setup bun
51- uses : oven-sh/setup-bun@v1
52-
53- - name : Enable corepack
54- run : corepack enable
54+ uses : oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
5555
5656 - name : Setup node
5757 uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
5858 with :
5959 node-version : ${{ matrix.node }}
60+ cache : pnpm
6061
6162 - name : Install dependencies
62- run : bun install
63+ run : pnpm install --frozen-lockfile
6364
6465 - name : Build codes
65- run : npm run build
66+ run : pnpm run build
6667
6768 test :
6869 name : Test
@@ -77,32 +78,33 @@ jobs:
7778 - name : Checkout codes
7879 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
7980
81+ - name : Install pnpm
82+ uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
83+
8084 - name : Setup deno
8185 uses : denoland/setup-deno@v1
8286 with :
8387 deno-version : v1.x
8488
8589 - name : Setup bun
86- uses : oven-sh/setup-bun@v1
90+ uses : oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
8791
8892 - name : Setup node
89- uses : actions/setup-node@v4
93+ uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
9094 with :
9195 node-version : ${{ matrix.node }}
92-
93- - name : Enable corepack
94- run : corepack enable
96+ cache : pnpm
9597
9698 - name : Install dependencies
97- run : bun install
99+ run : pnpm install --frozen-lockfile
98100
99101 # NOTE: avoid https://github.com/intlify/utils/actions/runs/6573605958/job/17857030689?pr=31#step:8:48
100102 # vitest-environment-miniflare tries to load dist/index.cjs and work with vitest...
101103 - name : Build codes
102- run : npm run build
104+ run : pnpm run build
103105
104106 - name : Test
105- run : npm test
107+ run : pnpm run test
106108
107109 e2e :
108110 name : E2E
@@ -117,54 +119,28 @@ jobs:
117119 - name : Checkout codes
118120 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
119121
122+ - name : Install pnpm
123+ uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
124+
120125 - name : Setup deno
121126 uses : denoland/setup-deno@v1
122127 with :
123128 deno-version : v1.x
124129
125130 - name : Setup bun
126- uses : oven-sh/setup-bun@v1
131+ uses : oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
127132
128133 - name : Setup node
129134 uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
130135 with :
131136 node-version : ${{ matrix.node }}
132-
133- - name : Enable corepack
134- run : corepack enable
137+ cache : pnpm
135138
136139 - name : Install dependencies
137- run : bun install
140+ run : pnpm install --frozen-lockfile
138141
139142 - name : Build codes
140- run : npm run build
141-
142- # https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L91
143- # Install playwright's binary under custom directory to cache
144- - name : (non-windows) Set Playwright path and Get playwright version
145- if : runner.os != 'Windows'
146- run : |
147- echo "PLAYWRIGHT_BROWSERS_PATH=$HOME/.cache/playwright-bin" >> $GITHUB_ENV
148- PLAYWRIGHT_VERSION="$(bun run ./scripts/playwright-version.ts)"
149- echo "PLAYWRIGHT_VERSION=$PLAYWRIGHT_VERSION" >> $GITHUB_ENV
150- - name : (windows) Set Playwright path and Get playwright version
151- if : runner.os == 'Windows'
152- run : |
153- echo "PLAYWRIGHT_BROWSERS_PATH=$HOME\.cache\playwright-bin" >> $env:GITHUB_ENV
154- PLAYWRIGHT_VERSION="$(bun run ./scripts/playwright-version.ts)"
155- echo "PLAYWRIGHT_VERSION=$env:PLAYWRIGHT_VERSION" >> $env:GITHUB_ENV
156-
157- - name : Cache Playwright's binary
158- uses : actions/cache@v4
159- with :
160- key : ${{ runner.os }}-playwright-bin-v1-${{ env.PLAYWRIGHT_VERSION }}
161- path : ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
162- restore-keys : |
163- ${{ runner.os }}-playwright-bin-v1-
164-
165- - name : Install Playwright
166- # does not need to explicitly set chromium after https://github.com/microsoft/playwright/issues/14862 is solved
167- run : bun x playwright install chromium
143+ run : pnpm run build
168144
169145 - name : Run test
170146 run : ./scripts/e2e.sh
@@ -185,27 +161,28 @@ jobs:
185161 - name : Checkout codes
186162 uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
187163
164+ - name : Install pnpm
165+ uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
166+
188167 - name : Setup deno
189168 uses : denoland/setup-deno@v1
190169 with :
191170 deno-version : v1.x
192171
193172 - name : Setup bun
194- uses : oven-sh/setup-bun@v1
173+ uses : oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
195174
196175 - name : Setup node
197176 uses : actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0
198177 with :
199178 node-version : ${{ matrix.node }}
200-
201- - name : Enable corepack
202- run : corepack enable
179+ cache : pnpm
203180
204181 - name : Install dependencies
205- run : bun install
182+ run : pnpm install --frozen-lockfile
206183
207184 - name : Build
208- run : npm run build
185+ run : pnpm run build
209186
210187 - name : Release Edge
211188 if : |
0 commit comments