Skip to content

Commit

Permalink
Merge branch 'next' into tom/sb-1040-allow-creating-templates-that-au…
Browse files Browse the repository at this point in the history
…gment
  • Loading branch information
yannbf committed Jan 10, 2023
2 parents a37efc6 + 751d137 commit 10bf302
Show file tree
Hide file tree
Showing 1,078 changed files with 20,486 additions and 20,318 deletions.
6 changes: 3 additions & 3 deletions .ci/danger/dangerfile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { execSync } from 'child_process';

execSync('npm install lodash');

const flatten = require('lodash/flatten');
const intersection = require('lodash/intersection');
const isEmpty = require('lodash/isEmpty');
const flatten = require('lodash/flatten.js');
const intersection = require('lodash/intersection.js');
const isEmpty = require('lodash/isEmpty.js');

const pkg = require('../../code/package.json'); // eslint-disable-line import/newline-after-import
const prLogConfig = pkg['pr-log'];
Expand Down
101 changes: 57 additions & 44 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ parameters:
workflow:
description: Which workflow to run
type: enum
enum: ["ci", "pr", "merged", "daily"]
default: "ci"
enum: ['ci', 'pr', 'merged', 'daily']
default: 'ci'

executors:
sb_node_16_classic:
parameters:
class:
description: The Resource class
type: enum
enum: ["small", "medium", "medium+", "large", "xlarge"]
default: "small"
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'small'
working_directory: /tmp/storybook
docker:
- image: cimg/node:16.17.1
Expand All @@ -26,8 +26,8 @@ executors:
class:
description: The Resource class
type: enum
enum: ["small", "medium", "medium+", "large", "xlarge"]
default: "small"
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'small'
working_directory: /tmp/storybook
docker:
- image: cimg/node:16.17.1-browsers
Expand All @@ -39,11 +39,11 @@ executors:
class:
description: The Resource class
type: enum
enum: ["small", "medium", "medium+", "large", "xlarge"]
default: "small"
enum: ['small', 'medium', 'medium+', 'large', 'xlarge']
default: 'small'
working_directory: /tmp/storybook
docker:
- image: mcr.microsoft.com/playwright:v1.28.0-focal
- image: mcr.microsoft.com/playwright:v1.29.1-focal
environment:
NODE_OPTIONS: --max_old_space_size=6144
resource_class: <<parameters.class>>
Expand All @@ -55,7 +55,7 @@ orbs:

commands:
cancel-workflow-on-failure:
description: "Cancels the entire workflow in case the previous step has failed"
description: 'Cancels the entire workflow in case the previous step has failed'
steps:
- run:
name: Cancel current workflow
Expand All @@ -65,13 +65,13 @@ commands:
echo "To execute all checks locally, please run yarn ci-tests"
curl -X POST --header "Content-Type: application/json" "https://circleci.com/api/v2/workflow/${CIRCLE_WORKFLOW_ID}/cancel?circle-token=${WORKFLOW_CANCELER}"
report-workflow-on-failure:
description: "Reports failures to discord"
description: 'Reports failures to discord'
parameters:
template:
description: |
Which template to report in discord. Applicable for parallel sandbox jobs
type: string
default: "none"
default: 'none'
steps:
- run:
when: on_fail
Expand All @@ -87,20 +87,33 @@ jobs:
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- restore_cache:
name: Restore Yarn cache
keys:
- prettydocs-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
- run:
name: Install
command: |
cd scripts
yarn install
- save_cache:
name: Save Yarn cache
key: prettydocs-yarn-2-cache-v4--{{ checksum "code/yarn.lock" }}--{{ checksum "scripts/yarn.lock" }}
paths:
- ~/.yarn/berry/cache
- run:
name: Prettier
command: |
cd scripts
yarn
yarn docs:prettier:check
build:
executor:
class: large
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- restore_cache:
name: Restore Yarn cache
keys:
Expand Down Expand Up @@ -142,14 +155,14 @@ jobs:
working_directory: /tmp/storybook
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Running local registry
command: |
cd code
yarn local-registry --port 6001 --open
yarn local-registry --open
background: true
- run:
name: Wait for registry
Expand Down Expand Up @@ -183,14 +196,14 @@ jobs:
working_directory: /tmp/storybook
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
name: Running local registry
command: |
cd code
yarn local-registry --port 6001 --open
yarn local-registry --open
background: true
- run:
name: Wait for registry
Expand Down Expand Up @@ -223,7 +236,7 @@ jobs:
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
Expand All @@ -239,7 +252,7 @@ jobs:
name: sb_node_16_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
Expand All @@ -253,7 +266,7 @@ jobs:
executor: sb_node_16_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
Expand All @@ -271,7 +284,7 @@ jobs:
name: sb_node_16_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
Expand All @@ -293,7 +306,7 @@ jobs:
name: sb_node_16_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
Expand Down Expand Up @@ -334,7 +347,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
Expand All @@ -359,7 +372,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
Expand All @@ -380,7 +393,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
Expand Down Expand Up @@ -414,7 +427,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
Expand Down Expand Up @@ -455,7 +468,7 @@ jobs:
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
clone_options: '--depth 1 --verbose'
- attach_workspace:
at: .
- run:
Expand Down Expand Up @@ -536,23 +549,23 @@ workflows:
requires:
- build
- create-sandboxes:
parallelism: 8
parallelism: 9
requires:
- build
- build-sandboxes:
parallelism: 8
parallelism: 9
requires:
- create-sandboxes
- test-runner-sandboxes:
parallelism: 8
parallelism: 9
requires:
- build-sandboxes
- chromatic-sandboxes:
parallelism: 8
parallelism: 9
requires:
- build-sandboxes
- e2e-sandboxes:
parallelism: 8
parallelism: 9
requires:
- build-sandboxes
merged:
Expand Down Expand Up @@ -586,23 +599,23 @@ workflows:
requires:
- build
- create-sandboxes:
parallelism: 14
parallelism: 16
requires:
- build
- build-sandboxes:
parallelism: 14
parallelism: 16
requires:
- create-sandboxes
- test-runner-sandboxes:
parallelism: 14
parallelism: 16
requires:
- build-sandboxes
- chromatic-sandboxes:
parallelism: 14
parallelism: 16
requires:
- build-sandboxes
- e2e-sandboxes:
parallelism: 14
parallelism: 16
requires:
- build-sandboxes
daily:
Expand All @@ -611,25 +624,25 @@ workflows:
jobs:
- build
- create-sandboxes:
parallelism: 23
parallelism: 28
requires:
- build
# - smoke-test-sandboxes: # disabled for now
# requires:
# - create-sandboxes
- build-sandboxes:
parallelism: 23
parallelism: 28
requires:
- create-sandboxes
- test-runner-sandboxes:
parallelism: 23
parallelism: 28
requires:
- build-sandboxes
- chromatic-sandboxes:
parallelism: 23
parallelism: 28
requires:
- build-sandboxes
- e2e-sandboxes:
parallelism: 23
parallelism: 28
requires:
- build-sandboxes
2 changes: 1 addition & 1 deletion .github/workflows/generate-repros-next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Compile Storybook libraries
run: yarn task --task publish --start-from=auto --no-link
- name: Running local registry
run: yarn local-registry --port 6001 --open &
run: yarn local-registry --open &
working-directory: ./code
- name: Wait for registry
run: yarn wait-on http://localhost:6001
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linear-export.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
trigger:
if: github.event.label.name == 'linear'
if: github.event.label.name == 'linear-ghaction'
name: Export to linear
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
.idea
*.iml
*.sw*
!.swcrc
dist
*.DS_Store
.cache
Expand Down
7 changes: 7 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"recommendations": [
"dbaeumer.vscode-eslint",
"unifiedjs.vscode-mdx",
"yzhang.markdown-all-in-one"
]
}
Loading

0 comments on commit 10bf302

Please sign in to comment.