Clarify storybook tests (#6073)
In this PR, I'm simplifying storybook setup: 1) Remove build --test configuration that prevent autodocs. We are not using autodocs at all (the dev experience is not good enough), so I have completely disabled it. 2) Clarify `serve` vs `test` vs `serve-and-test` configurations After this PR: - you can serve storybook in two modes: `npx nx run twenty-front:storybook:serve:dev` and `npx nx run twenty-front:storybook:serve:static` - you can run tests agains an already served storybook (this is useful in dev so you don't have to rebuild everytime to run tests): `npx nx run twenty-front:storybook:test` - you can conbine both: `npx nx run twenty-front:storybook:serve-and-test:static`
This commit is contained in:
6
.github/workflows/ci-front.yaml
vendored
6
.github/workflows/ci-front.yaml
vendored
@ -39,7 +39,7 @@ jobs:
|
||||
- name: Front / Write .env
|
||||
run: npx nx reset:env twenty-front
|
||||
- name: Front / Build storybook
|
||||
run: npx nx storybook:build twenty-front --configuration=test
|
||||
run: npx nx storybook:build twenty-front
|
||||
front-sb-test:
|
||||
runs-on: ci-8-cores
|
||||
needs: front-sb-build
|
||||
@ -64,7 +64,7 @@ jobs:
|
||||
- name: Front / Write .env
|
||||
run: npx nx reset:env twenty-front
|
||||
- name: Run storybook tests
|
||||
run: npx nx storybook:static:test twenty-front --configuration=${{ matrix.storybook_scope }}
|
||||
run: npx nx storybook:serve-and-test:static twenty-front --configuration=${{ matrix.storybook_scope }}
|
||||
front-sb-test-performance:
|
||||
runs-on: ci-8-cores
|
||||
env:
|
||||
@ -80,7 +80,7 @@ jobs:
|
||||
- name: Front / Write .env
|
||||
run: npx nx reset:env twenty-front
|
||||
- name: Run storybook tests
|
||||
run: npx nx storybook:performance:test twenty-front
|
||||
run: npx nx storybook:serve-and-test:static:performance twenty-front
|
||||
front-chromatic-deployment:
|
||||
if: contains(github.event.pull_request.labels.*.name, 'run-chromatic') || github.event_name == 'push'
|
||||
needs: front-sb-build
|
||||
|
||||
Reference in New Issue
Block a user