azure-rest-api-specs/preproduction-azure-pipelin...

50 строки
1.2 KiB
YAML

name: "Preproduction CI for Azure Rest API specifications"
trigger: none
variables:
TRAVIS: 'true'
TRAVIS_BRANCH: $(System.PullRequest.TargetBranch)
TRAVIS_PULL_REQUEST: $(System.PullRequest.PullRequestNumber)
TRAVIS_REPO_SLUG: $(Build.Repository.Name)
TRAVIS_PULL_REQUEST_SLUG: $(Build.Repository.Name)
TRAVIS_PULL_REQUEST_SHA: $(Build.SourceVersion)
PR_ONLY: 'true'
jobs:
- job: "BranchProtection"
pool:
vmImage: 'Ubuntu 16.04'
condition: and(variables['PRIVATE'], eq(variables['System.PullRequest.TargetBranch'], 'master'))
steps:
- script: '>&2 echo "the branch is protected"'
failOnStderr: true
- job: "Spellcheck"
condition: "not(variables['PRIVATE'])"
variables:
NODE_OPTIONS: '--max-old-space-size=8192'
pool:
vmImage: 'Ubuntu 16.04'
continueOnError: true
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: 'npm run spellcheck'
displayName: 'Run cSpell'
- job: "Avocado"
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: Npm@1
displayName: 'npm install'
inputs:
verbose: false
- script: 'npm install -D @azure/avocado@0.6.0'
- script: './node_modules/.bin/avocado'
displayName: 'Avocado'