Skip to content

feat(builder-rsbuild): support Storybook change detection #1746

feat(builder-rsbuild): support Storybook change detection

feat(builder-rsbuild): support Storybook change detection #1746

Workflow file for this run

name: CI
# Controls when the action will run.
on:
# Triggers the workflow on pull request events but only for the main branch
pull_request:
branches: [main, v1]
push:
branches: [main, v1]
merge_group:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
lint-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 10
- name: Install Pnpm
run: |
npm install -g corepack@latest --force
corepack enable
- name: Setup Node.js 20.x
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: 20.x
cache: 'pnpm'
- name: Install Dependencies
run: |
pnpm install --frozen-lockfile
- name: Lint / Type Check / Check Dependency Version
run: |
pnpm lint
pnpm check
pnpm check-dependency-version
# ======== test ========
test-build:
needs: lint-check
strategy:
matrix:
node-version: [20.x, 22.x]
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/.cache/ms-playwright
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 10
- name: Install Pnpm
run: |
npm install -g corepack@latest --force
corepack enable
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- name: Install Dependencies
run: |
pnpm install --frozen-lockfile
- name: Lint / Type Check / Check Dependency Version
run: |
pnpm lint
pnpm check
pnpm check-dependency-version
- name: Prepare Playwright cache directory
shell: bash
run: mkdir -p "$PLAYWRIGHT_BROWSERS_PATH"
- name: Cache Playwright browsers
uses: actions/cache@v5
with:
path: ${{ env.PLAYWRIGHT_BROWSERS_PATH }}
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-playwright-
- name: Install Playwright system dependencies
if: runner.os == 'Linux'
run: pnpm exec playwright install-deps
- name: Install Playwright browsers
run: pnpm exec playwright install chromium
# `pnpm dedupe --check` still find duplications after run `pnpm dedupe`
# - name: Check pnpm Dedupe
# run: pnpm dedupe --check
- name: Build sandboxes storybooks
run: |
pnpm run build:sandboxes
- name: Test
run: |
pnpm test
- name: Build test packages
run: |
pnpm build:test
- name: E2E
run: |
pnpm e2e