<commit_before>defaults: &defaults
  working_directory: /tmp/storybook
  docker:
    - image: circleci/node:8

version: 2
dependencies:
  pre:
    - yarn global add npm
jobs:
  build:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          name: "Restore core dependencies cache"
          keys:
            - core-dependencies-{{ checksum "yarn.lock" }}
      - run:
          name: "Install dependencies"
          command: |
            yarn install
      - run:
          name: "Dirty check"
          command: |
            yarn repo-dirty-check
      - run:
          name: "Bootstrap"
          command: |
            yarn bootstrap --core
      - save_cache:
          name: "Cache core dependencies"
          key: core-dependencies-{{ checksum "yarn.lock" }}
          paths:
            - node_modules
            - example/cra-kitchen-sink/node_modules
            - example/vue-kitchen-sink/node_modules
      - save_cache:
          name: "Cache core dist"
          key: core-dist-{{ .Revision }}
          paths:
            - addons
            - app
            - lib
  example-kitchen-sinks:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          name: "Restore core dependencies cache"
          keys:
            - core-dependencies-{{ checksum "yarn.lock" }}
      - restore_cache:
          name: "Restore core dist cache"
          keys:
            - core-dist-{{ .Revision }}
      - run:
          name: "Link packages"
          command: |
            yarn install
      - run:
          name: Workaround for https://github.com/GoogleChrome/puppeteer/issues/290
          command: sh ./scripts/workaround-puppeteer-issue-290.sh
      - run:
          name: "Build react kitchen-sink"
          command: |
            cd examples/cra-kitchen-sink
            yarn build-storybook
      - run:
          name: "Build vue kitchen-sink"
          command: |
            cd examples/vue-kitchen-sink
            yarn build-storybook
      - run:
          name: "Build angular-cli"
          command: |
            cd examples/angular-cli
            yarn build-storybook
      - run:
          name: "Run react kitchen-sink (smoke test)"
          command: |
            cd examples/cra-kitchen-sink
            yarn storybook --smoke-test
      - run:
          name: "Run vue kitchen-sink (smoke test)"
          command: |
            cd examples/vue-kitchen-sink
            yarn storybook --smoke-test
      - run:
          name: "Run angular-cli (smoke test)"
          command: |
            cd examples/angular-cli
            yarn storybook --smoke-test
      - run:
          name: "Run image snapshots on cra-kitchen-sink"
          command: yarn test --image<commit_msg>Add official-storybook static build to CI<commit_after>defaults: &defaults
  working_directory: /tmp/storybook
  docker:
    - image: circleci/node:8

version: 2
dependencies:
  pre:
    - yarn global add npm
jobs:
  build:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          name: "Restore core dependencies cache"
          keys:
            - core-dependencies-{{ checksum "yarn.lock" }}
      - run:
          name: "Install dependencies"
          command: |
            yarn install
      - run:
          name: "Dirty check"
          command: |
            yarn repo-dirty-check
      - run:
          name: "Bootstrap"
          command: |
            yarn bootstrap --core
      - save_cache:
          name: "Cache core dependencies"
          key: core-dependencies-{{ checksum "yarn.lock" }}
          paths:
            - node_modules
            - example/cra-kitchen-sink/node_modules
            - example/vue-kitchen-sink/node_modules
      - save_cache:
          name: "Cache core dist"
          key: core-dist-{{ .Revision }}
          paths:
            - addons
            - app
            - lib
  example-kitchen-sinks:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          name: "Restore core dependencies cache"
          keys:
            - core-dependencies-{{ checksum "yarn.lock" }}
      - restore_cache:
          name: "Restore core dist cache"
          keys:
            - core-dist-{{ .Revision }}
      - run:
          name: "Link packages"
          command: |
            yarn install
      - run:
          name: Workaround for https://github.com/GoogleChrome/puppeteer/issues/290
          command: sh ./scripts/workaround-puppeteer-issue-290.sh
      - run:
          name: "Build react kitchen-sink"
          command: |
            cd examples/cra-kitchen-sink
            yarn build-storybook
      - run:
          name: "Build official-storybook"
          command: |
            cd examples/official-storybook
            yarn build-storybook
      - run:
          name: "Build vue kitchen-sink"
          command: |
            cd examples/vue-kitchen-sink
            yarn build-storybook
      - run:
          name: "Build angular-cli"
          command: |
            cd examples/angular-cli
            yarn build-storybook
      - run:
          name: "Run react kitchen-sink (smoke test)"
          command: |
            cd examples/cra-kitchen-sink
            yarn storybook --smoke-test
      - run:
          name: "Run vue kitchen-sink (smoke test)"
          command: |
            cd examples/vue-kitchen-sink
            yarn storybook --smoke-test
      - run:
          name: "Run angular-cli (smoke test)"
          command: |
            cd examples/angular-cli
            yarn storybook --smoke-test
      - run:
          name: "Run image snapshots"
          command: yarn test --image
{'fraction_non_alphanumeric': 0.09596048685835244, 'fraction_numerical': 0.002822367260539778, 'mean_word_length': 1.3713927227101632, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3582784', 'n_tokens_mistral': 1642, 'n_tokens_neox': 1594, 'n_words': 395}