fix: fix storybook coverage task (#5256)
- Fixes storybook coverage command: the coverage directory path was incorrect, but instead of failing `storybook:test --configuration=ci`, it was hanging indefinitely. - Switches back to `concurrently` to launch `storybook:static` and `storybook:test` in parallel, which allows to use options to explicitly kill `storybook:static` when `storybook:test` fails. - Moves `storybook:test --configuration=ci` to its own command `storybook:static:test`: used in the CI, and can be used locally to run storybook tests without having to launch `storybook:dev` first. - Creates command `storybook:coverage` and enables cache for this command. - Fixes Jest tests that were failing. - Improves caching conditions for some tasks (for instance, no need to invalidate Jest test cache if only Storybook story files were modified).
This commit is contained in:
@ -24,6 +24,8 @@ runs:
|
||||
path: |
|
||||
.cache
|
||||
.nx/cache
|
||||
node_modules/.cache
|
||||
packages/*/node_modules/.cache
|
||||
key: tasks-cache-${{ github.ref_name }}-${{ inputs.tag }}-${{ steps.tasks-key.outputs.key }}${{ inputs.suffix }}-${{ github.sha }}
|
||||
restore-keys: |
|
||||
tasks-cache-${{ github.ref_name }}-${{ inputs.tag }}-${{ steps.tasks-key.outputs.key }}${{ inputs.suffix }}-
|
||||
2
.github/workflows/ci-front.yaml
vendored
2
.github/workflows/ci-front.yaml
vendored
@ -62,7 +62,7 @@ jobs:
|
||||
- name: Front / Write .env
|
||||
run: npx nx reset:env twenty-front
|
||||
- name: Run storybook tests
|
||||
run: npx nx storybook:test twenty-front --configuration=ci --scope=${{ matrix.storybook_scope }}
|
||||
run: npx nx storybook:static:test twenty-front --configuration=${{ matrix.storybook_scope }}
|
||||
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