[CI][FRONT] Storybook tests sharding (#9448)

# Introduction
The idea here is to improve perf nor fluidity of both storybook build
and tests execution duration.

## Levers:
- Storybook tests
[shards](https://storybook.js.org/docs/writing-tests/test-runner)
- Refactored storybook's build caching using `actions/cache/restore` and
`actions/cache/save` to avoid useless computation with we wanna just
write or retrieve it
- Running storybook build with --test
[flag](https://storybook.js.org/docs/api/main-config/main-config-build)
( please note that we only disable docs addons in order to keep coverage
up and running )

closes https://github.com/twentyhq/core-team-issues/issues/49
This commit is contained in:
Paul Rastoin
2025-01-10 18:40:03 +01:00
committed by GitHub
parent b40f58a512
commit 873f20bc0e
3 changed files with 101 additions and 46 deletions

View File

@ -31,6 +31,14 @@ const computeStoriesGlob = () => {
const config: StorybookConfig = {
stories: computeStoriesGlob(),
staticDirs: ['../public'],
build: {
test: {
disabledAddons: [
'@storybook/addon-docs',
'@storybook/addon-essentials/docs',
],
}
},
addons: [
'@storybook/addon-links',
'@storybook/addon-essentials',