PowerShell/.vsts-ci/spelling.yml
Travis Plunk 9894be9c60
Add path filters to CI YAML (#8222)
* Filter spelling to only PRs with `*.md` files
* filter common paths in CI yml
2018-11-09 11:38:44 -08:00

45 lines
1 KiB
YAML

name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
trigger:
branches:
include:
- master
- release*
paths:
include:
- '*.md'
pr:
branches:
include:
- master
- release*
paths:
include:
- '*.md'
resources:
- repo: self
clean: true
phases:
- phase: Linux_CI
queue:
name: Hosted Ubuntu 1604
steps:
- powershell: |
Get-ChildItem -Path env:
displayName: Capture environment
condition: succeededOrFailed()
- bash: |
sudo npm install -g markdown-spellcheck@0.11.0
displayName: Install mdspell
condition: succeededOrFailed()
- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
displayName: Set Build Name for Non-PR
condition: ne(variables['Build.Reason'], 'PullRequest')
- bash: |
mdspell '**/*.md' '!**/Pester/**/*.md' --ignore-numbers --ignore-acronyms --report --en-us;
displayName: Test Spelling
condition: succeededOrFailed()