mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-22 01:58:04 +00:00
* added test project * run fz test * rename proj * editor test project * check if FZ is running * rename * added assert messages * spelling * dev docs * spelling * update to latest stable * exclude ui tests deps * update packages list in notice.md * added sample tests * added file for tests run * removed unrecognized * removed run * fix test configuration * rename job * change dependance * run test template * removed condition * tabulation fix * removed arg * removed dependance * removed log * removed parameters * test * test * added parameters * pool * pool * vs test * dependance * download artifact * publish artifact * artifact publish conditions * artifact name, default download path * set folders * prepare dotnet and vstest platform * copy all * target dotnet8 * test build agents * set vs test version * spellcheck * set test platform version * package feed selector * hardcoded vstest location * are other tests running? * location * vstest.console * upd command * script path * search vstest.console * vs path * tools dir * check files * try full path * try vstest task * try full path in vstest task * change path, remove unnecessary * test with full vsconsole path * winappdriver task * changed args and condition * default address * added start operation type * task name * remove resolution * Update run-ui-tests-ci.yml * Update run-ui-tests-ci.yml * Update run-ui-tests-ci.yml * Update run-ui-tests-ci.yml * AgentResolution should be a string * Update run-ui-tests-ci.yml testing against what WinUI gallery has for agent * Update run-ui-tests-ci.yml * Update run-ui-tests-ci.yml * added WinAppDriver.exe * spellcheck * remove task * checkout * path * src dir variable * added init to the second project * set longer timeout * try waiting * rerun * log session info * exclude WinAppDriver files from spell-check * split io class: editor params * remove unnecessary * move data to the common project * io test helper * write retry * Moved constants * file utils * prepare editor files before launch * remove unused file * spellcheck * create directory * fixed cleaning up * remove WinAppDriver from deps * start WinAppDriver from the default installation path * installation script * Revert "spellcheck" This reverts commit 4bdc3957305daa20a5901aae83de0622ec41a93d. * Revert "exclude WinAppDriver files from spell-check" This reverts commit 21ee6db3f5afb4cae9ea51d9468c07caa8dbc0f4. * install * installation argument * spellcheck * change winappdriver path in fz tests * delete iohelper * update docs * deleted obsolete winappdriver tests * net version * try without vstest location * spellcheck * Revert "try without vstest location" This reverts commit 7cd39f3ae6735f53f7deea8d91312a8046309459. * moved json tag constants to the common project
317 lines
12 KiB
YAML
317 lines
12 KiB
YAML
parameters:
|
|
- name: additionalBuildArguments
|
|
type: string
|
|
default: ''
|
|
- name: enableCaching
|
|
type: boolean
|
|
default: false
|
|
|
|
steps:
|
|
- checkout: self
|
|
fetchDepth: 1
|
|
submodules: true
|
|
clean: true
|
|
|
|
- task: UseDotNet@2
|
|
displayName: 'Use .NET 6 SDK'
|
|
inputs:
|
|
packageType: sdk
|
|
version: '6.x'
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify XAML formatting
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\applyXamlStyling.ps1'
|
|
arguments: -Passive
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Nuget package versions for PowerToys.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyNugetPackages.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Arm64 configuration for PowerToys.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\PowerToys.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Arm64 configuration for BugReportTool.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\tools\BugReportTool\BugReportTool.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Arm64 configuration for WebcamReportTool.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\tools\WebcamReportTool\WebcamReportTool.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Arm64 configuration for StylesReportTool.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\tools\StylesReportTool\StylesReportTool.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Arm64 configuration for PowerToysSetup.sln
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyArm64Configuration.ps1'
|
|
arguments: -solution '$(build.sourcesdirectory)\installer\PowerToysSetup.sln'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify and set latest VCToolsVersion usage
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyAndSetLatestVCToolsVersion.ps1'
|
|
pwsh: true
|
|
|
|
- task: UseDotNet@2
|
|
displayName: 'Use .NET 8 SDK'
|
|
inputs:
|
|
packageType: sdk
|
|
version: '8.x'
|
|
includePreviewVersions: true
|
|
|
|
- task: VisualStudioTestPlatformInstaller@1
|
|
displayName: Ensure VSTest Platform
|
|
|
|
- ${{ if eq(parameters.enableCaching, true) }}:
|
|
- task: NuGetToolInstaller@1
|
|
displayName: Install NuGet
|
|
|
|
- script: nuget restore packages.config -SolutionDirectory .
|
|
displayName: 'nuget restore packages.config'
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build PowerToys.sln'
|
|
inputs:
|
|
solution: '**\PowerToys.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
${{ if eq(parameters.enableCaching, true) }}:
|
|
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }} -graph -reportfileaccesses -p:MSBuildCacheEnabled=true -p:MSBuildCacheLogDirectory=$(Build.ArtifactStagingDirectory)\logs\MSBuildCache -bl:$(Build.ArtifactStagingDirectory)\logs\PowerToys.binlog -ds:false
|
|
${{ else }}:
|
|
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }} -bl:$(Build.ArtifactStagingDirectory)\logs\PowerToys.binlog -ds:false
|
|
msbuildArchitecture: x64
|
|
maximumCpuCount: true
|
|
${{ if eq(parameters.enableCaching, true) }}:
|
|
env:
|
|
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build BugReportTool.sln'
|
|
inputs:
|
|
solution: '**\BugReportTool.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }} -bl:$(Build.ArtifactStagingDirectory)\logs\BugReportTool.binlog -ds:false
|
|
msbuildArchitecture: x64
|
|
maximumCpuCount: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build WebcamReportTool.sln'
|
|
inputs:
|
|
solution: '**\WebcamReportTool.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }} -bl:$(Build.ArtifactStagingDirectory)\logs\WebcamReportTool.binlog -ds:false
|
|
msbuildArchitecture: x64
|
|
maximumCpuCount: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build StylesReportTool.sln'
|
|
inputs:
|
|
solution: '**\StylesReportTool.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: -restore ${{ parameters.additionalBuildArguments }} -bl:$(Build.ArtifactStagingDirectory)\logs\StylesReportTool.binlog -ds:false
|
|
msbuildArchitecture: x64
|
|
maximumCpuCount: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Download and install WiX 3.14 development build
|
|
inputs:
|
|
targetType: filePath
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\installWiX.ps1'
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build PowerToys per-machine MSI'
|
|
inputs:
|
|
solution: '**\installer\PowerToysSetup.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: /t:PowerToysInstaller -restore ${{ parameters.additionalBuildArguments }} -bl:$(Build.ArtifactStagingDirectory)\logs\PowerToysSetup-PowerToysInstaller.binlog -ds:false
|
|
msbuildArchitecture: x64
|
|
maximumCpuCount: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build PowerToys per-machine Bootstrapper'
|
|
inputs:
|
|
solution: '**\installer\PowerToysSetup.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: /t:PowerToysBootstrapper ${{ parameters.additionalBuildArguments }} -bl:$(Build.ArtifactStagingDirectory)\logs\PowerToysSetup-PowerToysBootstrapper.binlog -ds:false
|
|
clean: false
|
|
msbuildArchitecture: x64
|
|
maximumCpuCount: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Clean installer dir before building per-user installer
|
|
inputs:
|
|
targetType: inline
|
|
script: git clean -xfd -e *exe -- .\installer\
|
|
pwsh: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build PowerToys per-user MSI'
|
|
inputs:
|
|
solution: '**\installer\PowerToysSetup.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: /t:PowerToysInstaller -restore ${{ parameters.additionalBuildArguments }} /p:PerUser=true -bl:$(Build.ArtifactStagingDirectory)\logs\PowerToysSetup-PowerToysInstaller-PerUser.binlog -ds:false
|
|
msbuildArchitecture: x64
|
|
maximumCpuCount: true
|
|
|
|
- task: VSBuild@1
|
|
displayName: 'Build PowerToys per-user Bootstrapper'
|
|
inputs:
|
|
solution: '**\installer\PowerToysSetup.sln'
|
|
vsVersion: 17.0
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
msbuildArgs: /t:PowerToysBootstrapper ${{ parameters.additionalBuildArguments }} /p:PerUser=true -bl:$(Build.ArtifactStagingDirectory)\logs\PowerToysSetup-PowerToysBootstrapper-PerUser.binlog -ds:false
|
|
clean: false
|
|
msbuildArchitecture: x64
|
|
maximumCpuCount: true
|
|
|
|
# Check if deps.json files don't reference different dll versions.
|
|
- task: PowerShell@2
|
|
displayName: Audit deps.json files for all applications
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyDepsJsonLibraryVersions.ps1'
|
|
arguments: -targetDir '$(build.sourcesdirectory)\$(BuildPlatform)\$(BuildConfiguration)'
|
|
pwsh: true
|
|
|
|
# Check if asset files on the main application paths are playing nice and avoiding basic conflicts.
|
|
- task: PowerShell@2
|
|
displayName: Audit base applications path asset conflicts
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyPossibleAssetConflicts.ps1'
|
|
arguments: -targetDir '$(build.sourcesdirectory)\$(BuildPlatform)\$(BuildConfiguration)'
|
|
pwsh: true
|
|
|
|
- task: PowerShell@2
|
|
displayName: Audit WinAppSDK applications path asset conflicts
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyPossibleAssetConflicts.ps1'
|
|
arguments: -targetDir '$(build.sourcesdirectory)\$(BuildPlatform)\$(BuildConfiguration)\WinUI3Apps'
|
|
pwsh: true
|
|
|
|
# directly not doing WinAppDriver testing
|
|
- task: VSTest@2
|
|
displayName: 'MS Tests'
|
|
condition: ne(variables['BuildPlatform'], 'arm64') # No arm64 agents to run the tests.
|
|
inputs:
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
testSelector: 'testAssemblies'
|
|
testAssemblyVer2: |
|
|
**\UnitTests-GcodeThumbnailProvider.dll
|
|
**\UnitTests-StlThumbnailProvider.dll
|
|
**\UnitTests-PdfThumbnailProvider.dll
|
|
**\UnitTests-QoiThumbnailProvider.dll
|
|
**\Settings.UI.UnitTests.dll
|
|
**\UnitTests-GcodePreviewHandler.dll
|
|
**\UnitTests-QoiPreviewHandler.dll
|
|
**\UnitTests-FancyZonesEditor.dll
|
|
**\UnitTests-PdfPreviewHandler.dll
|
|
**\UnitTests-PreviewHandlerCommon.dll
|
|
**\Microsoft.PowerToys.Run.Plugin.Registry.UnitTests.dll
|
|
**\UnitTest-ColorPickerUI.dll
|
|
**\Microsoft.Interop.Tests.dll
|
|
**\ImageResizer.Test.dll
|
|
**\Community.PowerToys.Run.Plugin.UnitConverter.UnitTest.dll
|
|
**\Community.PowerToys.Run.Plugin.ValueGenerator.UnitTests.dll
|
|
**\Microsoft.Plugin.Folder.UnitTests.dll
|
|
**\Microsoft.Plugin.Program.UnitTests.dll
|
|
**\Microsoft.PowerToys.Run.Plugin.Calculator.UnitTest.dll
|
|
**\Microsoft.Plugin.Uri.UnitTests.dll
|
|
**\Wox.Test.dll
|
|
**\Microsoft.PowerToys.Run.Plugin.System.UnitTests.dll
|
|
**\Microsoft.PowerToys.Run.Plugin.TimeDate.UnitTests.dll
|
|
**\Microsoft.Plugin.WindowsTerminal.UnitTests.dll
|
|
**\Microsoft.Plugin.WindowWalker.UnitTests.dll
|
|
**\PreviewPaneUnitTests.dll
|
|
**\UnitTests-SvgThumbnailProvider.dll
|
|
**\UnitTests-SvgPreviewHandler.dll
|
|
**\PowerToys.Hosts.Tests.dll
|
|
**\MouseJumpUI.UnitTests.dll
|
|
!**\obj\**
|
|
!**\ref\**
|
|
|
|
# Native dlls
|
|
- task: VSTest@2
|
|
condition: ne(variables['BuildPlatform'],'arm64') # No arm64 agents to run the tests.
|
|
displayName: 'Native Tests'
|
|
inputs:
|
|
platform: '$(BuildPlatform)'
|
|
configuration: '$(BuildConfiguration)'
|
|
testSelector: 'testAssemblies'
|
|
testAssemblyVer2: |
|
|
**\KeyboardManagerEngineTest.dll
|
|
**\KeyboardManagerEditorTest.dll
|
|
**\UnitTests-CommonLib.dll
|
|
**\PowerRenameUnitTests.dll
|
|
**\powerpreviewTest.dll
|
|
**\UnitTests-FancyZones.dll
|
|
!**\obj\**
|
|
|
|
- task: PowerShell@2
|
|
displayName: Trigger dotnet welcome message so that it does not cause errors on other scripts
|
|
inputs:
|
|
targetType: 'inline'
|
|
script: |
|
|
dotnet list $(build.sourcesdirectory)\src\common\Common.UI\Common.UI.csproj package
|
|
|
|
- task: PowerShell@2
|
|
displayName: Verify Notice.md and Nuget packages match
|
|
inputs:
|
|
filePath: '$(build.sourcesdirectory)\.pipelines\verifyNoticeMdAgainstNugetPackages.ps1'
|
|
arguments: -path '$(build.sourcesdirectory)\'
|
|
pwsh: true
|
|
|
|
- publish: $(Build.ArtifactStagingDirectory)\logs
|
|
displayName: Publish Logs
|
|
artifact: '$(System.JobDisplayName) logs'
|
|
condition: always()
|
|
|
|
- task: CopyFiles@2
|
|
displayName: Copy Build Files
|
|
condition: and(succeeded(), ne(variables['BuildPlatform'],'arm64'))
|
|
inputs:
|
|
sourceFolder: '$(Build.SourcesDirectory)'
|
|
contents: '$(BuildPlatform)/$(BuildConfiguration)/**/*'
|
|
targetFolder: '$(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)'
|
|
|
|
- task: PublishBuildArtifacts@1
|
|
displayName: Publish Build Artifacts
|
|
condition: and(succeeded(), ne(variables['BuildPlatform'],'arm64'))
|
|
inputs:
|
|
pathToPublish: '$(Build.ArtifactStagingDirectory)\$(BuildPlatform)\$(BuildConfiguration)'
|
|
artifactName: build-$(BuildPlatform)-$(BuildConfiguration)
|