PowerShell/.vsts-ci/mac.yml
Travis Plunk 058a19028d
Refactor macOS CI so that tests run in parallel (#9056)
Refactor macOS CI so that tests run in parallel 
  - Also:
    - Fix bootstrap issue where curl was failing for a month (so obviously not needed)
    - Change Windows test stages to use PowerShell Core (where we can) to avoid compat issues

## PR Context

This allows running all tests in about the same about of clock time.
2019-03-11 13:00:22 -07:00

99 lines
2.2 KiB
YAML

name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
trigger:
# Batch merge builds together while a merge build is running
batch: true
branches:
include:
- master
- release*
paths:
include:
- '*'
exclude:
- /tools/releaseBuild/**/*
- /.vsts-ci/misc-analysis.yml
pr:
branches:
include:
- master
- release*
paths:
include:
- '*'
exclude:
- /tools/releaseBuild/**/*
- /.vsts-ci/misc-analysis.yml
variables:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
POWERSHELL_TELEMETRY_OPTOUT: 1
# Avoid expensive initialization of dotnet cli, see: https://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1
# Enable VSTS debug mode until stabilitized
system.debug: 'true'
resources:
- repo: self
clean: true
jobs:
- template: templates/ci-build.yml
parameters:
pool: Hosted macOS
jobName: mac_build
displayName: macOS Build
- template: templates/nix-test.yml
parameters:
purpose: UnelevatedPesterTests
tagSet: CI
parentJobs:
- mac_build
- template: templates/nix-test.yml
parameters:
purpose: ElevatedPesterTests
tagSet: CI
parentJobs:
- mac_build
- template: templates/nix-test.yml
parameters:
purpose: UnelevatedPesterTests
tagSet: Others
parentJobs:
- mac_build
- template: templates/nix-test.yml
parameters:
purpose: ElevatedPesterTests
tagSet: Others
parentJobs:
- mac_build
- job: verify_xunit
displayName: Verify xUnit Results
pool:
name: 'Hosted macOS'
dependsOn:
- mac_build
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download build artifacts'
inputs:
downloadType: specific
itemPattern: |
xunit/**/*
downloadPath: '$(System.ArtifactsDirectory)'
- pwsh: |
Get-ChildItem "$(System.ArtifactsDirectory)\*" -Recurse
displayName: 'Capture artifacts directory'
continueOnError: true
- pwsh: |
Import-Module .\tools\ci.psm1
$xUnitTestResultsFile = "$(System.ArtifactsDirectory)\xunit\xUnitTestResults.xml"
Test-XUnitTestResults -TestResultsFile $xUnitTestResultsFile
displayName: Test
condition: succeeded()