mirror of
https://github.com/storybookjs/storybook.git
synced 2025-03-31 05:03:21 +08:00
Add build-sandboxes job
This commit is contained in:
parent
04d8f1a76d
commit
e99482156b
@ -506,6 +506,29 @@ jobs:
|
||||
cd code
|
||||
yarn once-per-template --step "Smoke Testing" --cadence ci \
|
||||
--junit test-results/smoketest.xml --script "yarn storybook --smoke-test --quiet"
|
||||
- store_test_results:
|
||||
path: code/test-results
|
||||
build-sandboxes:
|
||||
executor:
|
||||
class: medium+
|
||||
name: sb_node_14_browsers
|
||||
parallelism: 2
|
||||
steps:
|
||||
- git-shallow-clone/checkout_advanced:
|
||||
clone_options: '--depth 1 --verbose'
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- run:
|
||||
name: Building Sandboxes
|
||||
command: |
|
||||
BUILD_DIR="$PWD/../built-sandboxes"
|
||||
mkdir $BUILD_DIR
|
||||
cd code
|
||||
yarn once-per-template --step "Building" --cadence ci --junit test-results/build.xml \
|
||||
--script "yarn build-storybook --quiet --output-dir='$BUILD_DIR/$TEMPLATE_DIR'"
|
||||
- store_test_results:
|
||||
path: code/test-results
|
||||
|
||||
|
||||
workflows:
|
||||
test:
|
||||
@ -558,4 +581,6 @@ workflows:
|
||||
- smoke-test-sandboxes:
|
||||
requires:
|
||||
- create-sandboxes
|
||||
|
||||
- build-sandboxes:
|
||||
requires:
|
||||
- create-sandboxes
|
@ -169,10 +169,13 @@ async function run() {
|
||||
}
|
||||
|
||||
// Do some simple variable substitution
|
||||
toRun = toRun.replace('TEMPLATE_ENV', template.toUpperCase().replace(/\/-/, '_'));
|
||||
const templateEnv = template.toUpperCase().replace(/\/-/, '_');
|
||||
toRun = toRun.replace('TEMPLATE_ENV', templateEnv);
|
||||
const templateDir = template.replace('/', '-');
|
||||
toRun = toRun.replace('TEMPLATE_DIR', templateDir);
|
||||
toRun = toRun.replace('TEMPLATE', template);
|
||||
|
||||
const execaOptions = cd ? { cwd: join(sandboxDir, template.replace('/', '-')) } : {};
|
||||
const execaOptions = cd ? { cwd: join(sandboxDir, templateDir) } : {};
|
||||
if (parallel) {
|
||||
toAwait.push(runCommand(toRun, execaOptions, { step, template }));
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user