Boost CI (#1643)
* Boost CI * Split CI tests in 2 * Try caching node modules * Try caching node modules * Try caching node modules * Improve CI * Improve CI * Improve CI * Improve CI * Improve CI * Improve CI * Separate jest tests * Fix typo * Re-order tests jobs
This commit is contained in:
@ -1,5 +1,18 @@
|
||||
const path = require('path');
|
||||
|
||||
computeStoriesGlob = () => {
|
||||
if (process.env.STORYBOOK_STORIES_FOLDER === 'pages') {
|
||||
return ['../src/pages/**/*.stories.@(js|jsx|ts|tsx)', '../src/__stories__/*.stories.@(js|jsx|ts|tsx)']
|
||||
}
|
||||
|
||||
if (process.env.STORYBOOK_STORIES_FOLDER === 'modules') {
|
||||
return ['../src/modules/**/*.stories.@(js|jsx|ts|tsx)']
|
||||
}
|
||||
|
||||
return ['../src/**/*.stories.@(js|jsx|ts|tsx)']
|
||||
|
||||
};
|
||||
|
||||
module.exports = {
|
||||
webpackFinal: (config) => {
|
||||
config.module.rules.push({
|
||||
@ -55,7 +68,7 @@ module.exports = {
|
||||
};
|
||||
return config;
|
||||
},
|
||||
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|ts|tsx)'],
|
||||
stories: computeStoriesGlob(),
|
||||
addons: [
|
||||
'@storybook/addon-links',
|
||||
'@storybook/addon-essentials',
|
||||
|
||||
13
front/.storybook/test-runner-jest.js
Normal file
13
front/.storybook/test-runner-jest.js
Normal file
@ -0,0 +1,13 @@
|
||||
const { getJestConfig } = require('@storybook/test-runner');
|
||||
|
||||
/**
|
||||
* @type {import('@jest/types').Config.InitialOptions}
|
||||
*/
|
||||
module.exports = {
|
||||
// The default configuration comes from @storybook/test-runner
|
||||
...getJestConfig(),
|
||||
/** Add your own overrides below
|
||||
* @see https://jestjs.io/docs/configuration
|
||||
*/
|
||||
testTimeout: process.env.STORYBOOK_STORIES_FOLDER === 'pages' ? 30000 : 15000,
|
||||
};
|
||||
Reference in New Issue
Block a user