Skip to content

Commit

Permalink
Enable Corepack for sandbox builds in CI and update Node.js version
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinpalkovic committed May 27, 2024
1 parent ca8a0d1 commit 03b899a
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
37 changes: 20 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ parameters:
default: "skipped"

executors:
sb_node_16_classic:
sb_node_18_classic:
parameters:
class:
description: The Resource class
Expand All @@ -17,11 +17,11 @@ executors:
default: "small"
working_directory: /tmp/storybook
docker:
- image: cimg/node:18.19.1
- image: cimg/node:18.20.3
environment:
NODE_OPTIONS: --max_old_space_size=6144
resource_class: <<parameters.class>>
sb_node_16_browsers:
sb_node_18_browsers:
parameters:
class:
description: The Resource class
Expand All @@ -30,7 +30,7 @@ executors:
default: "small"
working_directory: /tmp/storybook
docker:
- image: cimg/node:18.19.1-browsers
- image: cimg/node:18.20.3-browsers
environment:
NODE_OPTIONS: --max_old_space_size=6144
resource_class: <<parameters.class>>
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
pretty-docs:
executor:
class: medium
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -125,7 +125,7 @@ jobs:
build:
executor:
class: xlarge
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand Down Expand Up @@ -169,7 +169,7 @@ jobs:
lint:
executor:
class: large
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -185,7 +185,7 @@ jobs:
check:
executor:
class: xlarge
name: sb_node_16_classic
name: sb_node_18_classic
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -202,7 +202,7 @@ jobs:
- report-workflow-on-failure
- cancel-workflow-on-failure
script-checks:
executor: sb_node_16_browsers
executor: sb_node_18_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand Down Expand Up @@ -230,7 +230,7 @@ jobs:
unit-tests:
executor:
class: xlarge
name: sb_node_16_browsers
name: sb_node_18_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -252,7 +252,7 @@ jobs:
coverage:
executor:
class: small
name: sb_node_16_browsers
name: sb_node_18_browsers
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
Expand All @@ -263,7 +263,7 @@ jobs:
chromatic-internal-storybooks:
executor:
class: medium+
name: sb_node_16_browsers
name: sb_node_18_browsers
environment:
NODE_OPTIONS: --max_old_space_size=6144
steps:
Expand All @@ -287,13 +287,16 @@ jobs:
type: integer
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
clone_options: "--depth 1 --verbose"
- attach_workspace:
at: .
- run:
name: Enable Corepack
command: sudo corepack enable yarn
- run:
name: Creating Sandboxes
command: yarn task --task sandbox --template $(yarn get-template --cadence << pipeline.parameters.workflow >> --task sandbox) --no-link --start-from=never --junit
Expand All @@ -311,7 +314,7 @@ jobs:
type: integer
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
Expand All @@ -331,7 +334,7 @@ jobs:
type: integer
executor:
class: large
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- git-shallow-clone/checkout_advanced:
Expand Down Expand Up @@ -410,7 +413,7 @@ jobs:
type: integer
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parallelism: << parameters.parallelism >>
steps:
- checkout
Expand Down Expand Up @@ -493,7 +496,7 @@ jobs:
test-empty-init:
executor:
class: medium
name: sb_node_16_browsers
name: sb_node_18_browsers
parameters:
packageManager:
type: string
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.19.1
18.20.3
1 change: 0 additions & 1 deletion scripts/utils/yarn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ export const installYarn2 = async ({ cwd, dryRun, debug }: YarnOptions) => {
const command = [
touch('yarn.lock'),
touch('.yarnrc.yml'),
`corepack enable`,
`yarn set version berry`,
// Use the global cache so we aren't re-caching dependencies each time we run sandbox
`yarn config set enableGlobalCache true`,
Expand Down

0 comments on commit 03b899a

Please sign in to comment.