<commit_before># https://aka.ms/yaml

trigger:
  branches:
    include:
    - master
    - feature/*
    - refs/tags/*.*.*

pr:
  branches:
    include:
    - master

resources:
- repo: self

variables:
  tag: '$(Build.SourceBranchName)'

stages:
- stage: Build
  jobs:
  - job: Build
    strategy:
      matrix:
        v12:
          NODE_VERSION_SPEC: '12.x'
        v14:
          NODE_VERSION_SPEC: '14.x'
        v16:
          NODE_VERSION_SPEC: '16.x'
      maxParallel: 3
    pool:
      vmImage: 'ubuntu-latest'
    steps:
    - checkout: self
      submodules: true
    - task: NodeTool@0
      displayName: 'Install Node.js'
      inputs:
        versionSpec: '$(NODE_VERSION_SPEC)'
    - script: npm install
      displayName: npm install
    - script: npm run build
      displayName: npm run build
    - script: npm test
      displayName: npm test
    - script: npm run clean
      displayName: npm run clean
  # todo: publish
  # - job: Publish
  #   condition: |<commit_msg>Update azure-pipelines.yml for Azure Pipelines<commit_after># https://aka.ms/yaml

trigger:
  branches:
    include:
    - master
    - feature/*
    - refs/tags/*.*.*

pr:
  branches:
    include:
    - master

resources:
- repo: self

variables:
  tag: '$(Build.SourceBranchName)'

stages:
- stage: Build
  jobs:
  - job: Build
    strategy:
      matrix:
        v12:
          NODE_VERSION_SPEC: '12.x'
        v14:
          NODE_VERSION_SPEC: '14.x'
        v16:
          NODE_VERSION_SPEC: '16.x'
      maxParallel: 3
    pool:
      vmImage: 'ubuntu-latest'
    steps:
    - checkout: self
      submodules: true
    - task: NodeTool@0
      displayName: 'Install Node.js'
      inputs:
        versionSpec: '$(NODE_VERSION_SPEC)'
    - script: npm install -g npm@latest
      displayName: Install latest npm
    - script: npm install
      displayName: npm install
    - script: npm run build
      displayName: npm run build
    - script: npm test
      displayName: npm test
    - script: npm run clean
      displayName: npm run clean
  # todo: publish
  # - job: Publish
  #   condition: |
{'fraction_non_alphanumeric': 0.1045346062052506, 'fraction_numerical': 0.013365155131264916, 'mean_word_length': 1.9815078236130867, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3905058', 'n_tokens_mistral': 736, 'n_tokens_neox': 690, 'n_words': 185}