<commit_before># Environment variables to be defined in the build configuration:
# AUTH0_TEST_CLIENT_ID = Client id to use in test
# AUTH0_TEST_DOMAIN = Domain to use in test
# AUTH0_TEST_AUDIENCE = API Audience to use in test

# Jobs and Workflows
version: 2.1
orbs:
  node: circleci/node@3.0.0
jobs:
  checkout:
    machine: true
    steps:
      - checkout
      - run: git clone https://github.com/auth0-samples/spa-quickstarts-tests scripts
      - persist_to_workspace:
          root: ~/
          paths:
            - project
            - scripts
  sample-01:
    machine: true
    environment:
      - AUTH0_CFG: Sample-01/auth_config.json
      - AUTH0_EXAMPLE_CFG: Sample-01/auth_config.json.example
      - SAMPLE_PATH: Sample-01
    steps:
      - node/install:
          node-version: latest
      - attach_workspace:
          at: ~/
      - run:
          name: Replace Auth0 test credentials
          command: |
            sed \
              -e 's/AUTH0_DOMAIN/$AUTH0_TEST_DOMAIN/g' \
              -e 's/AUTH0_CLIENT_ID/$AUTH0_TEST_CLIENT_ID/g' \
              -e 's/AUTH0_API_IDENTIFIER/$AUTH0_TEST_API_IDENTIFIER/g' \
              $AUTH0_EXAMPLE_CFG > $AUTH0_CFG

      - run:
          name: Build pull request
          command: |
            docker build -t $CIRCLE_JOB ./$SAMPLE_PATH
            docker run -d -p 3000:4200 --name $CIRCLE_SHA1 $CIRCLE_JOB
      - run:
          name: Wait for app to be available
          command: |
            sleep 10
            docker run --network host --rm appropriate/curl --retry 8 --retry-connrefused -v localhost:3000
      - node/install-packages:
          pkg-manager: yarn
          app-dir: $SAMPLE_PATH<commit_msg>Fix string replacement in build script<commit_after># Environment variables to be defined in the build configuration:
# AUTH0_TEST_CLIENT_ID = Client id to use in test
# AUTH0_TEST_DOMAIN = Domain to use in test
# AUTH0_TEST_AUDIENCE = API Audience to use in test

# Jobs and Workflows
version: 2.1
orbs:
  node: circleci/node@3.0.0
jobs:
  checkout:
    machine: true
    steps:
      - checkout
      - run: git clone https://github.com/auth0-samples/spa-quickstarts-tests scripts
      - persist_to_workspace:
          root: ~/
          paths:
            - project
            - scripts
  sample-01:
    machine: true
    environment:
      - AUTH0_CFG: Sample-01/auth_config.json
      - AUTH0_EXAMPLE_CFG: Sample-01/auth_config.json.example
      - SAMPLE_PATH: Sample-01
    steps:
      - node/install:
          node-version: latest
      - attach_workspace:
          at: ~/
      - run:
          name: Replace Auth0 test credentials
          command: |
            sed \
              -e "s/AUTH0_DOMAIN/$AUTH0_TEST_DOMAIN/g" \
              -e "s/AUTH0_CLIENT_ID/$AUTH0_TEST_CLIENT_ID/g" \
              -e "s/AUTH0_API_IDENTIFIER/$AUTH0_TEST_API_IDENTIFIER/g" \
              $AUTH0_EXAMPLE_CFG > $AUTH0_CFG

      - run:
          name: Build pull request
          command: |
            docker build -t $CIRCLE_JOB ./$SAMPLE_PATH
            docker run -d -p 3000:4200 --name $CIRCLE_SHA1 $CIRCLE_JOB
      - run:
          name: Wait for app to be available
          command: |
            sleep 10
            docker run --network host --rm appropriate/curl --retry 8 --retry-connrefused -v localhost:3000
      - node/install-packages:
          pkg-manager: yarn
          app-dir: $SAMPLE_PATH
{'fraction_non_alphanumeric': 0.08731321418107237, 'fraction_numerical': 0.025783767946088484, 'mean_word_length': 1.8355481727574752, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1160695', 'n_tokens_mistral': 1142, 'n_tokens_neox': 1083, 'n_words': 268}