Merge pull request #1131 from objectstack-ai/copilot/fix-chinese-lang… #2308
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Storybook Tests | |
| on: | |
| push: | |
| branches: [main, develop] | |
| paths: | |
| - 'packages/**' | |
| - '.storybook/**' | |
| - 'pnpm-lock.yaml' | |
| pull_request: | |
| branches: [main, develop] | |
| paths: | |
| - 'packages/**' | |
| - '.storybook/**' | |
| - 'pnpm-lock.yaml' | |
| concurrency: | |
| group: storybook-tests-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| storybook-test: | |
| name: Storybook Build & Test | |
| timeout-minutes: 30 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '20' | |
| cache: 'pnpm' | |
| - name: Turbo Cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: node_modules/.cache/turbo | |
| key: turbo-${{ runner.os }}-${{ github.sha }} | |
| restore-keys: | | |
| turbo-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm build | |
| - name: Build Storybook | |
| run: pnpm storybook:build | |
| - name: Install Playwright Browsers | |
| run: pnpm exec playwright install --with-deps chromium | |
| - name: Run Storybook tests | |
| run: pnpm storybook:ci | |
| - name: Run visual regression tests | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| concurrently -k -s first \ | |
| "pnpm storybook --no-open" \ | |
| "wait-on tcp:6006 && pnpm storybook:test:snapshot" |