<commit_before>pool:
  vmImage: 'ubuntu-16.04'

steps:
- script: |
    VERSION_PREFIX=$(sed -n 's/.*<VersionPrefix>\([^<]*\)<\/VersionPrefix>.*/\1/p' <<< cat ./build/common.props)
    if [ $APPVEYOR_REPO_TAG != "true" ]; then
      VERSION_SUFFIX="$BUILD_BUILDID-pre"
      VERSION="$VERSION_PREFIX.$VERSION_SUFFIX"
      echo "Version: $VERSION"
    else
      VERSION_SUFFIX=$BUILD_BUILDID
      VERSION="$VERSION_PREFIX.$VERSION_SUFFIX"
      echo "Version: $VERSION Tag: $BUILD_SOURCEBRANCEHNAME"
    fi
    docker build --target testrunner -t foundatio:test-$VERSION_SUFFIX --build-arg VERSION_SUFFIX=${VERSION_SUFFIX} .
    docker run -d -m 1g -p 9200:9200 -p 9300:9300 -e discovery.type=single-node -e ES_JAVA_OPTS='-Xms512m -Xmx512m' docker.elastic.co/elasticsearch/elasticsearch:6.5.1
    docker run --name testrunner --net=host --rm -d foundatio:test-$VERSION_SUFFIX
    docker cp testrunner:/app/artifacts $(System.DefaultWorkingDirectory)
    docker stop testrunner
    docker build --target pack -t foundatio:pack-$VERSION_SUFFIX --build-arg VERSION_SUFFIX=${VERSION_SUFFIX} .
    docker run  --name pack --net=host --rm -d foundatio:pack-$VERSION_SUFFIX
    docker cp pack:/app/artifacts $(System.DefaultWorkingDirectory)
    docker stop pack

- task: PublishTestResults@2
  inputs:
    testRunner: VSTest
    testResultsFiles: '**/*.trx'
<commit_msg>Update azure-pipelines.yml for Azure Pipelines<commit_after>pool:
  vmImage: 'ubuntu-16.04'

steps:
- script: |
    VERSION_PREFIX=$(sed -n 's/.*<VersionPrefix>\([^<]*\)<\/VersionPrefix>.*/\1/p' <<< cat ./build/common.props)
    if [ $APPVEYOR_REPO_TAG != "true" ]; then
      VERSION_SUFFIX="$BUILD_BUILDID-pre"
      VERSION="$VERSION_PREFIX.$VERSION_SUFFIX"
      echo "Version: $VERSION"
    else
      VERSION_SUFFIX=$BUILD_BUILDID
      VERSION="$VERSION_PREFIX.$VERSION_SUFFIX"
      echo "Version: $VERSION Tag: $BUILD_SOURCEBRANCEHNAME"
    fi
    docker build --target testrunner -t foundatio:test-$VERSION_SUFFIX --build-arg VERSION_SUFFIX=${VERSION_SUFFIX} .
    docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:6.5.1
    docker run --name testrunner --net=host --rm -d foundatio:test-$VERSION_SUFFIX
    docker cp testrunner:/app/artifacts $(System.DefaultWorkingDirectory)
    docker stop testrunner
    docker build --target pack -t foundatio:pack-$VERSION_SUFFIX --build-arg VERSION_SUFFIX=${VERSION_SUFFIX} .
    docker run --name pack --rm -d foundatio:pack-$VERSION_SUFFIX
    docker cp pack:/app/artifacts $(System.DefaultWorkingDirectory)
    docker stop pack

- task: PublishTestResults@2
  inputs:
    testRunner: VSTest
    testResultsFiles: '**/*.trx'

{'fraction_non_alphanumeric': 0.13574326816672813, 'fraction_numerical': 0.02102545186278126, 'mean_word_length': 3.791519434628975, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 7, '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': '4366553', 'n_tokens_mistral': 988, 'n_tokens_neox': 918, 'n_words': 190}