Skip to content

refactor: setup workspaces and monorepo with turbo repo #351

refactor: setup workspaces and monorepo with turbo repo

refactor: setup workspaces and monorepo with turbo repo #351

name: Storybook Tests (Pre-Deployment)
on: push
jobs:
test-storybook:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Install dependencies
run: pnpm install
- name: Install Playwright
run: npx playwright install --with-deps
- name: Build Storybook
run: pnpm build
- name: Serve Storybook and run tests
run: |
npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"npx http-server apps/storybook/storybook-static --port 6006 --silent" \
"npx wait-on tcp:6006 && pnpm test-storybook"
chromatic:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
- name: Install dependencies
# ⚠️ Pick one of these, matching the package manager for your project
run: pnpm install
- name: Publish to Chromatic
uses: chromaui/action@latest
with:
# ⚠️ Make sure to configure a `CHROMATIC_PROJECT_TOKEN` repository secret
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}