Skip to content

tests/replace cypress with storybook #911

tests/replace cypress with storybook

tests/replace cypress with storybook #911

Workflow file for this run

name: Unit & Component Tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
jobs:
tests:
name: Run unit tests and CT tests
if: ${{ !github.event.pull_request.draft }}
runs-on: ubuntu-latest
env:
VITE_APP_GIT_TAG: ${{github.ref}}
VITE_APP_GIT_SHA: ${{github.sha}}
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install pnpm
run: npm i -g pnpm
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint (show only errors)
run: pnpm lint --quiet
- name: Test
run: pnpm test
- name: Install Playwright
run: pnpx playwright install --with-deps
- name: Build Storybook
run: pnpm build-storybook --quiet
- name: Serve Storybook and run tests
env:
TEST_STORYBOOK_URL: http://localhost:6006
run: |
pnpx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \
"pnpx http-server storybook-static --port 6006 --silent" \
"pnpx wait-on tcp:6006 && pnpm test-storybook"
- name: Build
run: pnpm build