2018-09-13 02:54:21 +02:00
|
|
|
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
|
2018-11-09 20:38:44 +01:00
|
|
|
trigger:
|
2019-01-17 00:29:46 +01:00
|
|
|
# Batch merge builds together while a merge build is running
|
|
|
|
batch: true
|
2018-11-09 20:38:44 +01:00
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
- release*
|
2019-04-19 20:27:33 +02:00
|
|
|
- feature*
|
2018-11-16 00:17:48 +01:00
|
|
|
|
2018-11-09 20:38:44 +01:00
|
|
|
pr:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
- release*
|
2019-04-19 20:27:33 +02:00
|
|
|
- feature*
|
2018-09-13 02:54:21 +02:00
|
|
|
|
|
|
|
resources:
|
|
|
|
- repo: self
|
|
|
|
clean: true
|
2019-03-30 18:17:25 +01:00
|
|
|
jobs:
|
|
|
|
- template: templates/credscan.yml
|
2018-09-13 02:54:21 +02:00
|
|
|
|
2019-03-30 18:17:25 +01:00
|
|
|
- job: Linux_CI
|
|
|
|
|
|
|
|
displayName: Markdown and Common Tests
|
|
|
|
|
|
|
|
pool:
|
2018-09-13 02:54:21 +02:00
|
|
|
name: Hosted Ubuntu 1604
|
|
|
|
steps:
|
|
|
|
- powershell: |
|
|
|
|
Get-ChildItem -Path env:
|
2019-10-11 20:56:59 +02:00
|
|
|
displayName: Capture Environment
|
2018-09-13 02:54:21 +02:00
|
|
|
condition: succeededOrFailed()
|
2019-01-16 01:20:45 +01:00
|
|
|
|
2019-03-26 00:17:36 +01:00
|
|
|
- powershell: |
|
|
|
|
Install-module pester -Scope CurrentUser -Force
|
2019-01-16 01:20:45 +01:00
|
|
|
displayName: Install Pester
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
2018-09-13 02:54:21 +02:00
|
|
|
- bash: |
|
2019-04-10 23:16:22 +02:00
|
|
|
curl -o- --progress-bar -L https://yarnpkg.com/install.sh | bash
|
|
|
|
displayName: Bootstrap Yarn
|
|
|
|
condition: succeededOrFailed()
|
|
|
|
|
|
|
|
- bash: |
|
2019-06-17 21:10:56 +02:00
|
|
|
sudo yarn global add markdown-spellcheck@0.11.0
|
2018-09-13 02:54:21 +02:00
|
|
|
displayName: Install mdspell
|
|
|
|
condition: succeededOrFailed()
|
2019-01-16 01:20:45 +01:00
|
|
|
|
2018-09-13 02:54:21 +02:00
|
|
|
- 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')
|
2019-01-16 01:20:45 +01:00
|
|
|
|
2018-09-13 02:54:21 +02:00
|
|
|
- bash: |
|
|
|
|
mdspell '**/*.md' '!**/Pester/**/*.md' --ignore-numbers --ignore-acronyms --report --en-us;
|
2019-03-26 00:17:36 +01:00
|
|
|
displayName: Test Spelling in Markdown
|
2018-09-13 02:54:21 +02:00
|
|
|
condition: succeededOrFailed()
|
2019-01-16 01:20:45 +01:00
|
|
|
|
|
|
|
- powershell: |
|
|
|
|
Import-module ./build.psm1
|
|
|
|
$path = Join-Path -Path $pwd -ChildPath './commonTestResults.xml'
|
|
|
|
$results = invoke-pester -Script ./test/common -OutputFile $path -OutputFormat NUnitXml -PassThru
|
|
|
|
Write-Host "##vso[results.publish type=NUnit;mergeResults=true;runTitle=Common Tests;publishRunAttachments=true;resultFiles=$path;]"
|
|
|
|
if($results.TotalCount -eq 0 -or $results.FailedCount -gt 0)
|
|
|
|
{
|
2019-03-26 00:17:36 +01:00
|
|
|
throw "Markdown tests failed"
|
2019-01-16 01:20:45 +01:00
|
|
|
}
|
|
|
|
displayName: Run Common Tests
|
2019-01-03 23:47:59 +01:00
|
|
|
condition: succeededOrFailed()
|