<commit_before>version: 2

# Settings common to each job.
anchor_1: &defaults
  working_directory: ~/angular-cli
  docker:
    - image: angular/ngcontainer:0.0.5

# Restore cache based on package-lock.json checksum for branch.
anchor_2: &restore_cache_defaults
    key: angular-cli-{{ checksum "package-lock.json" }}

# Attach workspace that contains:
# - dist/ : built cli
# - angular-cli-e2e-default/ : initialized e2e test project
anchor_3: &attach_workspace_defaults
    at: /workspace

jobs:
  build:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: node --version
      - run: npm --version
      - run: npm install --no-save
      - run: npm run build
      - save_cache:
          key: angular-cli-{{ checksum "package-lock.json" }}
          paths:
            - "node_modules"

  lint:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: npm run lint

  test:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: npm run test

  # E2E test for current Angular.
  e2e-setup:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: mkdir /workspace
      - run: mkdir /workspace/angular-cli-e2e-default
      # Ignore all tests, we just want the setup step to persist it to the workspace.
      - run: node tests/run_e2e.js --tmpdir=/workspace/angular-cli-e2e-default --ignore=**/*
      - run: mv dist /workspace/
      - persist_to_workspace:
          root: /workspace
          paths:
            - dist/
            - angular-cli-e2e-default/

  e2e-0:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - attach_workspace:
          <<: *attach_workspace_defaults
      - run: cp -r /workspace/dist/ ./
      - run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=0 --nosilent

  e2e-1:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - attach_workspace:
          <<: *attach_workspace_defaults
      - run: cp -r /workspace/dist/ ./
      - run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=1 --nosilent

  e2e-2:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - attach_workspace:
          <<: *attach_workspace_defaults
      - run: cp -r /workspace/dist/ ./
      - run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=2 --nosilent

  e2e-3:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - attach_workspace:
          <<: *attach_workspace_defaults
      - run: cp -r /workspace/dist/ ./
      - run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=3 --nosilent

  # Master only E2E.
  ng2-e2e:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: xvfb-run -a node tests/run_e2e.js --ng2 "--glob=tests/build/**"

  ng4-e2e:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: xvfb-run -a node tests/run_e2e.js --ng4 "--glob=tests/build/**"

  nightly-e2e:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: xvfb-run -a node tests/run_e2e.js --nightly "--glob=tests/build/**"

workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - lint:
          requires:
            - build
      - test:
          requires:
            - build
      # E2E test for current Angular.
      - e2e-setup:
          requires:
            - build
      - e2e-0:
          requires:
            - e2e-setup
      - e2e-1:
          requires:
            - e2e-setup
      - e2e-2:
          requires:
            - e2e-setup
      - e2e-3:
          requires:
            - e2e-setup
      # Master only E2E.
      - ng2-e2e:
          requires:
            - build
          filters:
            branches:
              only:
                - master
      - ng4-e2e:
          requires:
            - build
          filters:
            branches:
              only:
                - master
      - nightly-e2e:
          requires:
            - build
          filters:
            branches:
              only:
                - master
<commit_msg>ci: remove master ng2/4 e2e tests<commit_after>version: 2

# Settings common to each job.
anchor_1: &defaults
  working_directory: ~/angular-cli
  docker:
    - image: angular/ngcontainer:0.0.5

# Restore cache based on package-lock.json checksum for branch.
anchor_2: &restore_cache_defaults
    key: angular-cli-{{ checksum "package-lock.json" }}

# Attach workspace that contains:
# - dist/ : built cli
# - angular-cli-e2e-default/ : initialized e2e test project
anchor_3: &attach_workspace_defaults
    at: /workspace

jobs:
  build:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: node --version
      - run: npm --version
      - run: npm install --no-save
      - run: npm run build
      - save_cache:
          key: angular-cli-{{ checksum "package-lock.json" }}
          paths:
            - "node_modules"

  lint:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: npm run lint

  test:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: npm run test

  # E2E test for current Angular.
  e2e-setup:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: mkdir /workspace
      - run: mkdir /workspace/angular-cli-e2e-default
      # Ignore all tests, we just want the setup step to persist it to the workspace.
      - run: node tests/run_e2e.js --tmpdir=/workspace/angular-cli-e2e-default --ignore=**/*
      - run: mv dist /workspace/
      - persist_to_workspace:
          root: /workspace
          paths:
            - dist/
            - angular-cli-e2e-default/

  e2e-0:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - attach_workspace:
          <<: *attach_workspace_defaults
      - run: cp -r /workspace/dist/ ./
      - run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=0 --nosilent

  e2e-1:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - attach_workspace:
          <<: *attach_workspace_defaults
      - run: cp -r /workspace/dist/ ./
      - run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=1 --nosilent

  e2e-2:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - attach_workspace:
          <<: *attach_workspace_defaults
      - run: cp -r /workspace/dist/ ./
      - run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=2 --nosilent

  e2e-3:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - attach_workspace:
          <<: *attach_workspace_defaults
      - run: cp -r /workspace/dist/ ./
      - run: xvfb-run -a node tests/run_e2e.js --nobuild --reuse=/workspace/angular-cli-e2e-default/test-project --nb-shards=4 --shard=3 --nosilent

  # Master only E2E.
  nightly-e2e:
    <<: *defaults
    steps:
      - checkout
      - restore_cache:
          <<: *restore_cache_defaults
      - run: xvfb-run -a node tests/run_e2e.js --nightly "--glob=tests/build/**"

workflows:
  version: 2
  build_and_test:
    jobs:
      - build
      - lint:
          requires:
            - build
      - test:
          requires:
            - build
      # E2E test for current Angular.
      - e2e-setup:
          requires:
            - build
      - e2e-0:
          requires:
            - e2e-setup
      - e2e-1:
          requires:
            - e2e-setup
      - e2e-2:
          requires:
            - e2e-setup
      - e2e-3:
          requires:
            - e2e-setup
      # Master only E2E.
      - nightly-e2e:
          requires:
            - build
          filters:
            branches:
              only:
                - master

{'fraction_non_alphanumeric': 0.12109025915996426, 'fraction_numerical': 0.014857015192135836, 'mean_word_length': 1.6003485332558816, 'pattern_counts': {'":': 0, '<': 99, '<?xml version=': 0, '>': 3, 'https://': 0, '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': '3582762', 'n_tokens_mistral': 3060, 'n_tokens_neox': 2975, 'n_words': 615}