<commit_before>defaults: &defaults
  working_directory: /tmp/material-ui
  docker:
    - image: circleci/node:6.11
restore_repo: &restore_repo
  restore_cache:
    keys:
      - v1-repo-{{ .Branch }}-{{ .Revision }}
version: 2
jobs:
  checkout:
    <<: *defaults
    steps:
      - *restore_repo
      - checkout
      - run:
          name: Check versions and env
          command: |
            yarn --version
            node --version
            docker --version
            docker-compose --version
            env
            yarn cache dir
      - restore_cache:
          key: v1-yarn-sha-{{ checksum "yarn.lock" }}
      - run:
          name: Install js dependencies
          command: yarn install --pure-lockfile
      - save_cache:
          key: v1-yarn-sha-{{ checksum "yarn.lock" }}
          paths:
            - ~/.cache/yarn/v1
      - save_cache:
          key: v1-repo-{{ .Branch }}-{{ .Revision }}
          paths:
            - /tmp/material-ui
  test_unit:
    <<: *defaults
    steps:
      - *restore_repo
      - run:
          name: Lint
          command: yarn lint
      - run:
          name: Flow
          command: yarn flow
      - run:
          name: Tests fake browser
          command: yarn test:coverage
      - run:
          name: Check coverage generated
          command: |
            if ! [[ -s coverage/lcov.info ]]
            then
              exit 1
            fi
      - run:
          name: Coverage
          command: bash <(curl -s https://codecov.io/bash)
  test_build:
    <<: *defaults
    steps:
      - *restore_repo
      - run:
          name: Can we generate the build?
          command: yarn build
      - run:
          name: Is the size acceptable?
          command: yarn size
      - run:
          name: Can we generate the api of the docs?
          command: yarn docs:api
  test_browser:
    <<: *defaults
    steps:
      - *restore_repo
      - run:
          name: Tests real browsers
          command: yarn test:karma
  test_regressions:
    <<: *defaults
    docker:
      - image: circleci/node:6.11
      - image: selenium/standalone-chrome:3.4.0
    steps:
      - *restore_repo
      - run:
          name: Visual regression tests
          command: |
            DOCKER_TEST_URL=http://$(ip addr show lo | grep "inet\b" | awk '{print $2}' | cut -d/ -f1):3090 yarn test:regressions
            yarn argos
workflows:
  version: 2
  pipeline:
    jobs:
      - checkout
      - test_unit:
          requires:
            - checkout
      - test_browser:
          requires:
            - checkout
      - test_build:
          requires:
            - checkout
      - test_regressions:
          requires:
            - test_unit
            - test_browser
            - test_build
<commit_msg>[core] Add TypeScript in the CI (#8328)<commit_after>defaults: &defaults
  working_directory: /tmp/material-ui
  docker:
    - image: circleci/node:6.11
restore_repo: &restore_repo
  restore_cache:
    keys:
      - v1-repo-{{ .Branch }}-{{ .Revision }}
version: 2
jobs:
  checkout:
    <<: *defaults
    steps:
      - *restore_repo
      - checkout
      - run:
          name: Check versions and env
          command: |
            yarn --version
            node --version
            docker --version
            docker-compose --version
            env
            yarn cache dir
      - restore_cache:
          key: v1-yarn-sha-{{ checksum "yarn.lock" }}
      - run:
          name: Install js dependencies
          command: yarn install --pure-lockfile
      - save_cache:
          key: v1-yarn-sha-{{ checksum "yarn.lock" }}
          paths:
            - ~/.cache/yarn/v1
      - save_cache:
          key: v1-repo-{{ .Branch }}-{{ .Revision }}
          paths:
            - /tmp/material-ui
  test_unit:
    <<: *defaults
    steps:
      - *restore_repo
      - run:
          name: Lint
          command: yarn lint
      - run:
          name: Flow
          command: yarn flow
      - run:
          name: TypeScript
          command: yarn typescript
      - run:
          name: Tests fake browser
          command: yarn test:coverage
      - run:
          name: Check coverage generated
          command: |
            if ! [[ -s coverage/lcov.info ]]
            then
              exit 1
            fi
      - run:
          name: Coverage
          command: bash <(curl -s https://codecov.io/bash)
  test_build:
    <<: *defaults
    steps:
      - *restore_repo
      - run:
          name: Can we generate the build?
          command: yarn build
      - run:
          name: Is the size acceptable?
          command: yarn size
      - run:
          name: Can we generate the api of the docs?
          command: yarn docs:api
  test_browser:
    <<: *defaults
    steps:
      - *restore_repo
      - run:
          name: Tests real browsers
          command: yarn test:karma
  test_regressions:
    <<: *defaults
    docker:
      - image: circleci/node:6.11
      - image: selenium/standalone-chrome:3.4.0
    steps:
      - *restore_repo
      - run:
          name: Visual regression tests
          command: |
            DOCKER_TEST_URL=http://$(ip addr show lo | grep "inet\b" | awk '{print $2}' | cut -d/ -f1):3090 yarn test:regressions
            yarn argos
workflows:
  version: 2
  pipeline:
    jobs:
      - checkout
      - test_unit:
          requires:
            - checkout
      - test_browser:
          requires:
            - checkout
      - test_build:
          requires:
            - checkout
      - test_regressions:
          requires:
            - test_unit
            - test_browser
            - test_build

{'fraction_non_alphanumeric': 0.09881562665723882, 'fraction_numerical': 0.0088386070355312, 'mean_word_length': 1.3312731767614339, 'pattern_counts': {'":': 0, '<': 25, '<?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': '1160698', 'n_tokens_mistral': 1732, 'n_tokens_neox': 1646, 'n_words': 438}