<commit_before>defaults: &defaults
  working_directory: ~/repo
  environment:
    MAVEN_OPTS: -server -showversion -XX:+PrintCommandLineFlags -XX:+UseCodeCacheFlushing -Xms1024M -Xmx2048M -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:+ScavengeBeforeFullGC -XX:+CMSScavengeBeforeRemark -XX:NewSize=600m -XX:MaxNewSize=900m -XX:SurvivorRatio=10 -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom

version: 2
jobs:
  build:
    <<: *defaults
    docker:
      - image: killbill/kbbuild:0.2.0
    steps:
      - checkout
      - restore_cache:
          key: v1-dependencies-{{ .Branch }}-{{ checksum "pom.xml" }}
      - run:
          name: Setup dependencies
          command: |
            if [ "${CIRCLE_BRANCH}" != "master" ]; then
              for i in killbill-oss-parent killbill-api killbill-plugin-api; do
                if [ -n "$(git ls-remote --heads https://github.com/killbill/$i.git ${CIRCLE_BRANCH})" ]; then
                  echo "*** Setting up $i"
                  mkdir -p /home/killbill/$i
                  git clone https://github.com/killbill/$i.git /home/killbill/$i
                  pushd /home/killbill/$i
                  git checkout -b ${CIRCLE_BRANCH} origin/${CIRCLE_BRANCH}
                  mvn clean install -DskipTests=true
                  popd
                fi
              done
            fi
      - run: mvn -DskipTests=true clean install dependency:go-offline
      - save_cache:
          paths:
            - ~/.m2
          key: v1-dependencies-{{ .Branch }}-{{ checksum "pom.xml" }}

  test-mysql:
    <<: *defaults
    docker:
      - image: killbill/kbbuild:0.2.0
    steps:
      - checkout
      - restore_cache:
          key: v1-dependencies-{{ .Branch }}-{{ checksum "pom.xml" }}
      - run: mvn clean install -Pmysql
      - run:
          name: Save test results
          command: |
            mkdir -p ~/junit/
            find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \;
          when: always
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit

workflows:
  version: 2
  build-and-test:
    jobs:
      - build
      - test-mysql:<commit_msg>ci: add Travis profile to enable release checks<commit_after>defaults: &defaults
  working_directory: ~/repo
  environment:
    MAVEN_OPTS: -server -showversion -XX:+PrintCommandLineFlags -XX:+UseCodeCacheFlushing -Xms1024M -Xmx2048M -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:+CMSConcurrentMTEnabled -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70 -XX:+ScavengeBeforeFullGC -XX:+CMSScavengeBeforeRemark -XX:NewSize=600m -XX:MaxNewSize=900m -XX:SurvivorRatio=10 -XX:+DisableExplicitGC -Djava.security.egd=file:/dev/./urandom

version: 2
jobs:
  build:
    <<: *defaults
    docker:
      - image: killbill/kbbuild:0.2.0
    steps:
      - checkout
      - restore_cache:
          key: v1-dependencies-{{ .Branch }}-{{ checksum "pom.xml" }}
      - run:
          name: Setup dependencies
          command: |
            if [ "${CIRCLE_BRANCH}" != "master" ]; then
              for i in killbill-oss-parent killbill-api killbill-plugin-api; do
                if [ -n "$(git ls-remote --heads https://github.com/killbill/$i.git ${CIRCLE_BRANCH})" ]; then
                  echo "*** Setting up $i"
                  mkdir -p /home/killbill/$i
                  git clone https://github.com/killbill/$i.git /home/killbill/$i
                  pushd /home/killbill/$i
                  git checkout -b ${CIRCLE_BRANCH} origin/${CIRCLE_BRANCH}
                  mvn clean install -DskipTests=true
                  popd
                fi
              done
            fi
      - run: mvn -DskipTests=true clean install dependency:go-offline
      - save_cache:
          paths:
            - ~/.m2
          key: v1-dependencies-{{ .Branch }}-{{ checksum "pom.xml" }}

  test-h2:
    <<: *defaults
    docker:
      - image: killbill/kbbuild:0.2.0
    steps:
      - checkout
      - restore_cache:
          key: v1-dependencies-{{ .Branch }}-{{ checksum "pom.xml" }}
      - run: mvn clean install -Ptravis
      - run:
          name: Save test results
          command: |
            mkdir -p ~/junit/
            find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \;
          when: always
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit
  test-mysql:
    <<: *defaults
    docker:
      - image: killbill/kbbuild:0.2.0
    steps:
      - checkout
      - restore_cache:
          key: v1-dependencies-{{ .Branch }}-{{ checksum "pom.xml" }}
      - run: mvn clean install -Pmysql
      - run:
          name: Save test results
          command: |
            mkdir -p ~/junit/
            find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} ~/junit/ \;
          when: always
      - store_test_results:
          path: ~/junit
      - store_artifacts:
          path: ~/junit

workflows:
  version: 2
  build-and-test:
    jobs:
      - build
      - test-h2:
          requires:
            - build
      - test-mysql:
{'fraction_non_alphanumeric': 0.1270220588235294, 'fraction_numerical': 0.01213235294117647, 'mean_word_length': 1.8667017913593256, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 10}, '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': '2315893', 'n_tokens_mistral': 1870, 'n_tokens_neox': 1756, 'n_words': 366}