<commit_before>jobs:
- job: Windows
  dependsOn: GetReleaseVersion
  timeoutInMinutes: 180
  strategy:
    maxParallel: 2
    matrix:
      x64:
        buildArch: x64
      x86:
        buildArch: x86

  pool:
    vmImage: vs2015-win2012r2 # needed for python 2.7 and gyp

  variables:
    ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ]
    IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ]
    IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ]

  steps:
  - task: NodeTool@0
    inputs:
      versionSpec: 8.9.3
    displayName: Install Node.js 8.9.3

  - script: |
      ECHO Installing npm-windows-upgrade
      npm install --global --production npm-windows-upgrade
      ECHO Upgrading npm
      npm-windows-upgrade --no-spinner --no-prompt --npm-version 6.2.0
    displayName: Install npm 6.2.0

  - script: |
      cd script\vsts
      npm install
    displayName: Install Windows build dependencies

  - script: |
      IF NOT EXIST C:\tmp MKDIR C:\tmp
      SET SQUIRREL_TEMP=C:\tmp
      IF [%IS_RELEASE_BRANCH%]==[true] (
        ECHO Creating production artifacts for release branch %BUILD_SOURCEBRANCHNAME%
        node script\vsts\windows-run.js script\build.cmd --code-sign --compress-artifacts --create-windows-installer
      ) ELSE (
        IF [%IS_SIGNED_ZIP_BRANCH%]==[true] (
          ECHO Creating signed CI artifacts for branch %BUILD_SOURCEBRANCHNAME%
          node script\vsts\windows-run.js script\build.cmd --code-sign --compress-artifacts
        ) ELSE (
          ECHO Pull request build, no code signing will be performed
          node script\vsts\windows-run.js script\build.cmd --compress-artifacts
        )
      )
    env:
      BUILD_ARCH: $(buildArch)
      ATOM_RELEASE_VERSION: $(ReleaseVersion)
      ATOM_WIN_CODE_SIGNING_CERT_DOWNLOAD_URL: $(ATOM_WIN_CODE_SIGNING_CERT_DOWNLOAD_URL)
      ATOM_WIN_CODE_SIGNING_CERT_PASSWORD: $(ATOM_WIN_CODE_SIGNING_CERT_PASSWORD)
      IS_RELEASE_BRANCH: $(IsReleaseBranch)
      IS_SIGNED_ZIP_BRANCH: $(IsSignedZipBranch)
    displayName: Build Atom

  - script: node script\vsts\windows-run.js script\lint.cmd
    env:
      BUILD_ARCH: $(buildArch)
    displayName: Run linter

  - script: node script\vsts\windows-run.js script\test.cmd
    env:
      CI: true
      CI_PROVIDER: VSTS
      ATOM_JASMINE_REPORTER: list
      TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)\test-results
      BUILD_ARCH: $(buildArch)
    displayName: Run tests
    condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true'))

  - ps: Get-ChildItem -Recurse %TEST_JUNIT_XML_PATH%
    env:
      TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)\test-results
    displayName: Dump test results

  - task: PublishTestResults@2
    inputs:
      testResultsFormat: JUnit
      searchFolder: $(Agent.HomeDirectory)\test-results
      mergeTestResults: true
      testRunTitle: Windows $(buildArch)
    condition: succeededOrFailed()

  - task: PublishBuildArtifacts@1
    inputs:
      PathtoPublish: $(Build.SourcesDirectory)/out/atom-x64-windows.zip
      ArtifactName: atom-x64-windows.zip
      ArtifactType: Container<commit_msg>I could swear you used to be able to shorten that<commit_after>jobs:
- job: Windows
  dependsOn: GetReleaseVersion
  timeoutInMinutes: 180
  strategy:
    maxParallel: 2
    matrix:
      x64:
        buildArch: x64
      x86:
        buildArch: x86

  pool:
    vmImage: vs2015-win2012r2 # needed for python 2.7 and gyp

  variables:
    ReleaseVersion: $[ dependencies.GetReleaseVersion.outputs['Version.ReleaseVersion'] ]
    IsReleaseBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsReleaseBranch'] ]
    IsSignedZipBranch: $[ dependencies.GetReleaseVersion.outputs['Version.IsSignedZipBranch'] ]

  steps:
  - task: NodeTool@0
    inputs:
      versionSpec: 8.9.3
    displayName: Install Node.js 8.9.3

  - script: |
      ECHO Installing npm-windows-upgrade
      npm install --global --production npm-windows-upgrade
      ECHO Upgrading npm
      npm-windows-upgrade --no-spinner --no-prompt --npm-version 6.2.0
    displayName: Install npm 6.2.0

  - script: |
      cd script\vsts
      npm install
    displayName: Install Windows build dependencies

  - script: |
      IF NOT EXIST C:\tmp MKDIR C:\tmp
      SET SQUIRREL_TEMP=C:\tmp
      IF [%IS_RELEASE_BRANCH%]==[true] (
        ECHO Creating production artifacts for release branch %BUILD_SOURCEBRANCHNAME%
        node script\vsts\windows-run.js script\build.cmd --code-sign --compress-artifacts --create-windows-installer
      ) ELSE (
        IF [%IS_SIGNED_ZIP_BRANCH%]==[true] (
          ECHO Creating signed CI artifacts for branch %BUILD_SOURCEBRANCHNAME%
          node script\vsts\windows-run.js script\build.cmd --code-sign --compress-artifacts
        ) ELSE (
          ECHO Pull request build, no code signing will be performed
          node script\vsts\windows-run.js script\build.cmd --compress-artifacts
        )
      )
    env:
      BUILD_ARCH: $(buildArch)
      ATOM_RELEASE_VERSION: $(ReleaseVersion)
      ATOM_WIN_CODE_SIGNING_CERT_DOWNLOAD_URL: $(ATOM_WIN_CODE_SIGNING_CERT_DOWNLOAD_URL)
      ATOM_WIN_CODE_SIGNING_CERT_PASSWORD: $(ATOM_WIN_CODE_SIGNING_CERT_PASSWORD)
      IS_RELEASE_BRANCH: $(IsReleaseBranch)
      IS_SIGNED_ZIP_BRANCH: $(IsSignedZipBranch)
    displayName: Build Atom

  - script: node script\vsts\windows-run.js script\lint.cmd
    env:
      BUILD_ARCH: $(buildArch)
    displayName: Run linter

  - script: node script\vsts\windows-run.js script\test.cmd
    env:
      CI: true
      CI_PROVIDER: VSTS
      ATOM_JASMINE_REPORTER: list
      TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)\test-results
      BUILD_ARCH: $(buildArch)
    displayName: Run tests
    condition: and(succeeded(), ne(variables['Atom.SkipTests'], 'true'))

  - powershell: Get-ChildItem -Recurse %TEST_JUNIT_XML_PATH%
    env:
      TEST_JUNIT_XML_PATH: $(Agent.HomeDirectory)\test-results
    displayName: Dump test results

  - task: PublishTestResults@2
    inputs:
      testResultsFormat: JUnit
      searchFolder: $(Agent.HomeDirectory)\test-results
      mergeTestResults: true
      testRunTitle: Windows $(buildArch)
    condition: succeededOrFailed()

  - task: PublishBuildArtifacts@1
    inputs:
      PathtoPublish: $(Build.SourcesDirectory)/out/atom-x64-windows.zip
      ArtifactName: atom-x64-windows.zip
      ArtifactType: Container
{'fraction_non_alphanumeric': 0.09512044471896232, 'fraction_numerical': 0.012970969734403953, 'mean_word_length': 3.065913370998117, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5375243', 'n_tokens_mistral': 2189, 'n_tokens_neox': 2071, 'n_words': 433}