mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-04 15:11:10 +08:00
Merge pull request #19352 from storybookjs/disable-cra-default-ts-smoke-test
Disable smoke test on cra/default-ts
This commit is contained in:
commit
33f942bcca
@ -485,7 +485,7 @@ jobs:
|
||||
at: .
|
||||
- run:
|
||||
name: Creating Sandboxes
|
||||
command: yarn task --task create --template $(yarn get-template ci) --force --no-before --junit
|
||||
command: yarn task --task create --template $(yarn get-template ci create) --force --no-before --junit
|
||||
working_directory: code
|
||||
- persist_to_workspace:
|
||||
root: .
|
||||
@ -497,7 +497,7 @@ jobs:
|
||||
executor:
|
||||
class: medium+
|
||||
name: sb_node_14_browsers
|
||||
parallelism: 10
|
||||
parallelism: 9
|
||||
steps:
|
||||
- git-shallow-clone/checkout_advanced:
|
||||
clone_options: '--depth 1 --verbose'
|
||||
@ -505,7 +505,7 @@ jobs:
|
||||
at: .
|
||||
- run:
|
||||
name: Smoke Testing Sandboxes
|
||||
command: yarn task --task smoke-test --template $(yarn get-template ci) --force --no-before --junit
|
||||
command: yarn task --task smoke-test --template $(yarn get-template ci smoke-test) --force --no-before --junit
|
||||
working_directory: code
|
||||
- store_test_results:
|
||||
path: code/test-results
|
||||
@ -521,7 +521,7 @@ jobs:
|
||||
at: .
|
||||
- run:
|
||||
name: Building Sandboxes
|
||||
command: yarn task --task build --template $(yarn get-template ci) --force --no-before --junit
|
||||
command: yarn task --task build --template $(yarn get-template ci build) --force --no-before --junit
|
||||
working_directory: code
|
||||
- store_test_results:
|
||||
path: code/test-results
|
||||
@ -541,7 +541,7 @@ jobs:
|
||||
at: .
|
||||
- run:
|
||||
name: Running Test Runner
|
||||
command: yarn task --task test-runner --template $(yarn get-template ci) --force --no-before --junit
|
||||
command: yarn task --task test-runner --template $(yarn get-template ci test-runner) --force --no-before --junit
|
||||
working_directory: code
|
||||
- store_test_results:
|
||||
path: code/test-results
|
||||
@ -557,7 +557,7 @@ jobs:
|
||||
at: .
|
||||
- run:
|
||||
name: Running Chromatic
|
||||
command: yarn task --task chromatic --template $(yarn get-template ci) --force --no-before --junit
|
||||
command: yarn task --task chromatic --template $(yarn get-template ci chromatic) --force --no-before --junit
|
||||
working_directory: code
|
||||
- store_test_results:
|
||||
path: code/test-results
|
||||
@ -573,7 +573,7 @@ jobs:
|
||||
at: .
|
||||
- run:
|
||||
name: Running E2E Tests
|
||||
command: yarn task --task e2e-tests --template $(yarn get-template ci) --force --no-before --junit
|
||||
command: yarn task --task e2e-tests --template $(yarn get-template ci e2e-tests) --force --no-before --junit
|
||||
working_directory: code
|
||||
- store_test_results:
|
||||
path: code/test-results
|
||||
|
@ -13,6 +13,8 @@ const craTemplates = {
|
||||
name: 'Create React App (Typescript)',
|
||||
script: 'npx create-react-app . --template typescript',
|
||||
cadence: ['ci', 'daily', 'weekly'],
|
||||
// Re-enable once https://github.com/storybookjs/storybook/issues/19351 is fixed.
|
||||
skipTasks: ['smoke-test'],
|
||||
expected: {
|
||||
framework: '@storybook/cra',
|
||||
renderer: '@storybook/react',
|
||||
|
@ -8,10 +8,10 @@ const sandboxDir = resolve(__dirname, '../sandbox');
|
||||
export type Cadence = 'ci' | 'daily' | 'weekly';
|
||||
export type Template = {
|
||||
cadence?: readonly Cadence[];
|
||||
skipScripts?: string[];
|
||||
skipTasks?: string[];
|
||||
// there are other fields but we don't use them here
|
||||
};
|
||||
export type TemplateKey = string;
|
||||
export type TemplateKey = keyof typeof TEMPLATES;
|
||||
export type Templates = Record<TemplateKey, Template>;
|
||||
|
||||
async function getDirectories(source: string) {
|
||||
@ -34,7 +34,7 @@ export async function getTemplate(
|
||||
(templateKey) => templateKey.replace('/', '-') === dirName
|
||||
);
|
||||
})
|
||||
.filter(Boolean);
|
||||
.filter(Boolean) as TemplateKey[];
|
||||
}
|
||||
|
||||
if (potentialTemplateKeys.length === 0) {
|
||||
@ -42,10 +42,13 @@ export async function getTemplate(
|
||||
const cadenceTemplates = allTemplates.filter(([, template]) =>
|
||||
template.cadence.includes(cadence)
|
||||
);
|
||||
const jobTemplates = cadenceTemplates.filter(([, t]) => !t.skipScripts?.includes(scriptName));
|
||||
potentialTemplateKeys = jobTemplates.map(([k]) => k);
|
||||
potentialTemplateKeys = cadenceTemplates.map(([k]) => k) as TemplateKey[];
|
||||
}
|
||||
|
||||
potentialTemplateKeys = potentialTemplateKeys.filter(
|
||||
(t) => !(TEMPLATES[t] as Template).skipTasks?.includes(scriptName)
|
||||
);
|
||||
|
||||
if (potentialTemplateKeys.length !== total) {
|
||||
throw new Error(`Circle parallelism set incorrectly.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user