Skip to content

Commit

Permalink
Merge pull request #12118 from PK1312/patch-3
Browse files Browse the repository at this point in the history
Updating and optimizing circleCI Config
  • Loading branch information
shilman committed Aug 19, 2020
2 parents eb29e9a + 67837d2 commit f2a1fc5
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
version: 2.1

aliases:
- &defaults
executors:
sb_node:
parameters:
class:
description: The Resource class
type: enum
enum: ["small", "medium", "large", "xlarge"]
default: "medium"
working_directory: /tmp/storybook
docker:
- image: circleci/node:10-browsers
resource_class: <<parameters.class>>

jobs:
install:
<<: *defaults
executor: sb_node
steps:
- checkout
- restore_cache:
Expand Down Expand Up @@ -37,7 +44,7 @@ jobs:
- app
- lib
build:
<<: *defaults
executor: sb_node
steps:
- checkout
- attach_workspace:
Expand All @@ -54,7 +61,7 @@ jobs:
- app
- lib
chromatic:
<<: *defaults
executor: sb_node
parallelism: 11
steps:
- checkout
Expand All @@ -65,7 +72,7 @@ jobs:
command: |
yarn run-chromatics
packtracker:
<<: *defaults
executor: sb_node
steps:
- checkout
- attach_workspace:
Expand All @@ -76,7 +83,7 @@ jobs:
cd examples/official-storybook
yarn packtracker
examples:
<<: *defaults
executor: sb_node
parallelism: 11
steps:
- checkout
Expand All @@ -91,7 +98,7 @@ jobs:
paths:
- built-storybooks
publish:
<<: *defaults
executor: sb_node
steps:
- checkout
- attach_workspace:
Expand Down Expand Up @@ -188,7 +195,7 @@ jobs:
destination: cypress

smoke-tests:
<<: *defaults
executor: sb_node
steps:
- checkout
- attach_workspace:
Expand Down Expand Up @@ -254,7 +261,7 @@ jobs:
cd examples/cra-react15
yarn storybook --smoke-test --quiet
frontpage:
<<: *defaults
executor: sb_node
steps:
- checkout
- restore_cache:
Expand All @@ -268,7 +275,9 @@ jobs:
name: Trigger build
command: ./scripts/build-frontpage.js
lint:
<<: *defaults
executor:
class: small
name: sb_node
steps:
- checkout
- attach_workspace:
Expand All @@ -277,7 +286,7 @@ jobs:
name: Lint
command: yarn lint
test:
<<: *defaults
executor: sb_node
steps:
- checkout
- attach_workspace:
Expand All @@ -290,7 +299,9 @@ jobs:
paths:
- coverage
coverage:
<<: *defaults
executor:
class: small
name: sb_node
steps:
- checkout
- attach_workspace:
Expand Down

0 comments on commit f2a1fc5

Please sign in to comment.