Skip to content

Commit

Permalink
chore: add pkg.pr.new (#6362)
Browse files Browse the repository at this point in the history
Co-authored-by: Hiroshi Ogawa <hi.ogawa.zz@gmail.com>
  • Loading branch information
userquin and hi-ogawa authored Oct 1, 2024
1 parent 214ec26 commit 9edfa19
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 1 deletion.
46 changes: 46 additions & 0 deletions .github/workflows/cr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CR

on:
push:
branches: [main]
pull_request:
types: [opened, synchronize, labeled]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true

jobs:
release:
if: github.repository == 'vitest-dev/vitest' && (github.ref == 'refs/heads/main' || contains(github.event.pull_request.labels.*.name, 'cr-tracked'))
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install pnpm
uses: pnpm/action-setup@v4

- name: Set node version to 20
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
cache: pnpm

- name: Install
run: pnpm install --frozen-lockfile --prefer-offline
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: '1'

- name: Build
run: pnpm build
env:
NO_VITE_TEST_WATCHER_DEBUG: '1'

- name: Publish to StackBlitz
run: pnpx pkg-pr-new publish --compact --no-template --pnpm './packages/*'
4 changes: 3 additions & 1 deletion docs/guide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ Thanks for choosing Vitest!

## Using Unreleased Commits

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):
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}`.

If you want to test your own modification locally, you can build and link it yourself ([pnpm](https://pnpm.io/) is required):

```bash
git clone https://github.com/vitest-dev/vitest.git
Expand Down

0 comments on commit 9edfa19

Please sign in to comment.