mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-16 05:03:11 +08:00
Filter by cadence
This commit is contained in:
parent
4777e943e8
commit
1b075df5da
@ -3,6 +3,7 @@ export default {
|
||||
'cra/default-js': {
|
||||
name: 'Create React App (Javascript)',
|
||||
script: 'npx create-react-app .',
|
||||
cadence: ['ci', 'daily', 'weekly'],
|
||||
expected: {
|
||||
framework: '@storybook/cra',
|
||||
renderer: '@storybook/react',
|
||||
@ -12,6 +13,7 @@ export default {
|
||||
'cra/default-ts': {
|
||||
name: 'Create React App (Typescript)',
|
||||
script: 'npx create-react-app . --template typescript',
|
||||
cadence: ['ci', 'daily', 'weekly'],
|
||||
expected: {
|
||||
framework: '@storybook/cra',
|
||||
renderer: '@storybook/react',
|
||||
|
@ -43,16 +43,19 @@ export const options = createOptions({
|
||||
});
|
||||
|
||||
async function run() {
|
||||
const { script: commandline, parallel } = await getOptionsOrPrompt(
|
||||
'yarn multiplex-templates',
|
||||
options
|
||||
);
|
||||
const {
|
||||
cadence,
|
||||
script: commandline,
|
||||
parallel,
|
||||
} = await getOptionsOrPrompt('yarn multiplex-templates', options);
|
||||
|
||||
const command = await parseCommand(commandline);
|
||||
|
||||
const allTemplates = Object.keys(TEMPLATES);
|
||||
// TODO -- filter by cadence
|
||||
const templates = filterDataForCurrentCircleCINode(allTemplates);
|
||||
const allTemplates = Object.keys(TEMPLATES) as (keyof typeof TEMPLATES)[];
|
||||
const cadenceTemplates = allTemplates.filter((template) =>
|
||||
TEMPLATES[template].cadence.includes(cadence)
|
||||
);
|
||||
const templates = filterDataForCurrentCircleCINode(cadenceTemplates);
|
||||
|
||||
const toAwait = [];
|
||||
for (const template of templates) {
|
||||
|
@ -2,6 +2,11 @@
|
||||
cra/default-js:
|
||||
name: "Create React App (Javascript)"
|
||||
script: "npx create-react-app ."
|
||||
# how often to test this template:
|
||||
# ci: every push
|
||||
# daily: during our daily job
|
||||
# weekly; during our weekly job
|
||||
cadence: ["ci", "daily", "weekly"]
|
||||
expected:
|
||||
framework: "@storybook/cra"
|
||||
renderer: "@storybook/react"
|
||||
@ -10,6 +15,7 @@ cra/default-js:
|
||||
cra/default-ts:
|
||||
name: "Create React App (Typescript)"
|
||||
script: "npx create-react-app . --template typescript"
|
||||
cadence: ["ci", "daily", "weekly"]
|
||||
expected:
|
||||
framework: "@storybook/cra"
|
||||
renderer: "@storybook/react"
|
||||
|
Loading…
x
Reference in New Issue
Block a user