testfx/azure-pipelines.yml

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

143 строки
4.3 KiB
YAML
Исходник Постоянная ссылка Обычный вид История

2022-12-22 13:04:18 +03:00
# Branch(es) that trigger(s) build(s) on PR
2022-09-01 17:06:02 +03:00
pr:
2022-12-22 13:04:18 +03:00
branches:
include:
- main
- rel/*
paths:
exclude:
- .github/*
- .devcontainer/*
2022-12-22 13:38:23 +03:00
- docs/*
2022-12-22 15:34:57 +03:00
- .markdownlint.json
- .markdownlintignore
2022-12-22 13:38:23 +03:00
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- README.md
2022-12-22 13:04:18 +03:00
- SECURITY.md
2023-11-30 21:58:15 +03:00
- src/**/*.xlf
2022-12-22 13:04:18 +03:00
parameters:
2024-01-23 13:36:12 +03:00
# This option should be used with caution. This is useful for unblocking circular deps issue with testanywhere
- name: SkipTests
displayName: "Skip tests"
type: boolean
default: False
2022-12-22 13:04:18 +03:00
variables:
# Cannot use key:value syntax in root defined variables
2023-01-03 23:13:17 +03:00
- name: _TeamName
2022-12-22 13:04:18 +03:00
value: MSTest
- name: _RunAsInternal
value: False
2022-12-22 13:04:18 +03:00
- name: _RunAsPublic
value: True
2023-07-13 13:20:23 +03:00
2022-12-22 13:04:18 +03:00
stages:
- stage: build
displayName: Build
jobs:
- template: /eng/common/templates/jobs/jobs.yml
parameters:
enableMicrobuild: true
enablePublishBuildArtifacts: true
enablePublishTestResults: true
testResultsFormat: 'vstest'
2023-01-03 23:13:17 +03:00
enablePublishBuildAssets: true
2022-12-22 13:04:18 +03:00
enablePublishUsingPipelines: true
enableTelemetry: true
jobs:
- job: Windows
2024-09-09 22:46:37 +03:00
timeoutInMinutes: 90
2022-12-22 13:04:18 +03:00
pool:
name: NetCore-Public
demands: ImageOverride -equals windows.vs2022preview.amd64.open
2022-12-22 13:04:18 +03:00
strategy:
matrix:
Release:
_BuildConfig: Release
Debug:
_BuildConfig: Debug
2022-12-22 13:04:18 +03:00
steps:
- task: PowerShell@2
displayName: 'Install Windows SDK'
inputs:
targetType: filePath
filePath: './eng/install-windows-sdk.ps1'
2022-12-22 13:04:18 +03:00
failOnStderr: true
showWarnings: true
2024-06-03 17:14:04 +03:00
- task: PowerShell@2
displayName: 'Install procdump'
inputs:
targetType: filePath
filePath: ./eng/install-procdump.ps1
failOnStderr: true
showWarnings: true
2022-12-22 13:04:18 +03:00
2023-01-03 23:13:17 +03:00
- script: eng\common\CIBuild.cmd
-configuration $(_BuildConfig)
-prepareMachine
/p:Test=false
/p:FastAcceptanceTest=true
2023-01-03 23:13:17 +03:00
name: Build
displayName: Build
2024-01-23 13:36:12 +03:00
- ${{ if eq(parameters.SkipTests, False) }}:
# -ci is allowing to import some environment variables and some required configurations
# -nobl avoids overwriting build binlog with binlog from tests
2024-01-23 13:36:12 +03:00
- script: Test.cmd
-configuration $(_BuildConfig)
-ci
-nobl
2024-01-23 13:36:12 +03:00
name: Test
displayName: Test
2024-08-28 12:37:44 +03:00
# Upload code coverage data
- script: $(Build.SourcesDirectory)/.dotnet/dotnet msbuild -restore
eng/CodeCoverage.proj
/p:Configuration=$(_BuildConfig)
/bl:$(BUILD.SOURCESDIRECTORY)\artifacts\log\$(_BuildConfig)\CodeCoverage.binlog
displayName: Upload coverage to codecov.io
condition: and(succeeded(), eq(variables._BuildConfig, 'Debug'))
2024-01-23 13:36:12 +03:00
# This step is only helpful for diagnosing some issues with vstest/test host that would not appear
# through the console or trx
- task: PublishBuildArtifacts@1
displayName: 'Publish Test Results folders'
inputs:
PathtoPublish: '$(Build.SourcesDirectory)/artifacts/TestResults/$(_BuildConfig)'
ArtifactName: TestResults
condition: failed()
2022-12-22 13:04:18 +03:00
2023-11-27 22:52:10 +03:00
- job: Linux
2024-09-09 22:46:37 +03:00
timeoutInMinutes: 90
2023-11-27 22:52:10 +03:00
pool:
name: NetCore-Public
demands: ImageOverride -equals build.ubuntu.2004.amd64.open
2023-11-27 22:52:10 +03:00
strategy:
matrix:
Release:
_BuildConfig: Release
Debug:
_BuildConfig: Debug
2023-11-27 22:52:10 +03:00
steps:
- script: eng/common/cibuild.sh
-configuration $(_BuildConfig)
-prepareMachine
/p:Test=false
2023-11-27 23:27:47 +03:00
/p:NonWindowsBuild=true
/p:FastAcceptanceTest=true
2023-11-27 22:52:10 +03:00
displayName: Build
2024-01-23 13:36:12 +03:00
- ${{ if eq(parameters.SkipTests, False) }}:
2024-06-12 15:32:19 +03:00
# --ci is allowing to import some environment variables and some required configurations
2024-06-12 16:08:22 +03:00
# --nobl avoids overwriting build binlog with binlog from tests
2024-01-23 13:36:12 +03:00
- script: |
chmod +x ./test.sh
./test.sh --configuration $(_BuildConfig) --ci --test --integrationTest --nobl
2024-01-23 13:36:12 +03:00
name: Test
displayName: Tests