Skip to content

Commit 9edfa19

Browse files
userquinhi-ogawa
andauthored
chore: add pkg.pr.new (#6362)
Co-authored-by: Hiroshi Ogawa <[email protected]>
1 parent 214ec26 commit 9edfa19

File tree

2 files changed

+49
-1
lines changed

2 files changed

+49
-1
lines changed

.github/workflows/cr.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: CR
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types: [opened, synchronize, labeled]
8+
9+
permissions: {}
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.event.number }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
release:
17+
if: github.repository == 'vitest-dev/vitest' && (github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'cr-tracked'))
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Install pnpm
26+
uses: pnpm/action-setup@v4
27+
28+
- name: Set node version to 20
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
registry-url: https://registry.npmjs.org/
33+
cache: pnpm
34+
35+
- name: Install
36+
run: pnpm install --frozen-lockfile --prefer-offline
37+
env:
38+
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'
39+
40+
- name: Build
41+
run: pnpm build
42+
env:
43+
NO_VITE_TEST_WATCHER_DEBUG: '1'
44+
45+
- name: Publish to StackBlitz
46+
run: pnpx pkg-pr-new publish --compact --no-template --pnpm './packages/*'

docs/guide/index.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,9 @@ Thanks for choosing Vitest!
287287

288288
## Using Unreleased Commits
289289

290-
If you can't wait for a new release to test the latest features, you will need to clone the [vitest repo](https://github.com/vitest-dev/vitest) to your local machine and then build and link it yourself ([pnpm](https://pnpm.io/) is required):
290+
Each commit on main branch and a PR with a `cr-tracked` label are published to [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new). You can install it by `npm i https://pkg.pr.new/vitest@{commit}`.
291+
292+
If you want to test your own modification locally, you can build and link it yourself ([pnpm](https://pnpm.io/) is required):
291293

292294
```bash
293295
git clone https://github.com/vitest-dev/vitest.git

0 commit comments

Comments
 (0)