Optimize UI Tests build time in CI (#24334)
This commit is contained in:
Родитель
dc6cbf9d66
Коммит
328a61e084
|
@ -181,6 +181,26 @@ Task("dotnet-samples")
|
|||
RunMSBuildWithDotNet("./Microsoft.Maui.Samples.slnf", properties, binlogPrefix: "sample-");
|
||||
});
|
||||
|
||||
// Builds the host app for the UI Tests
|
||||
Task("uitests-apphost")
|
||||
.IsDependentOn("dotnet-buildtasks")
|
||||
.Does(() =>
|
||||
{
|
||||
var tempDir = PrepareSeparateBuildContext("samplesTest");
|
||||
|
||||
var properties = new Dictionary<string, string>();
|
||||
|
||||
if(useNuget)
|
||||
{
|
||||
properties = new Dictionary<string, string> {
|
||||
["UseWorkload"] = "true",
|
||||
// ["GenerateAppxPackageOnBuild"] = "true",
|
||||
["RestoreConfigFile"] = tempDir.CombineWithFilePath("NuGet.config").FullPath,
|
||||
};
|
||||
}
|
||||
RunMSBuildWithDotNet("./src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj", properties, binlogPrefix: "uitests-apphost-");
|
||||
});
|
||||
|
||||
Task("dotnet-legacy-controlgallery")
|
||||
.IsDependentOn("dotnet-legacy-controlgallery-android")
|
||||
.IsDependentOn("dotnet-legacy-controlgallery-ios");
|
||||
|
|
|
@ -47,7 +47,7 @@ steps:
|
|||
- pwsh: echo "##vso[task.prependpath]$(DotNet.Dir)"
|
||||
displayName: 'Add .NET to PATH'
|
||||
|
||||
- pwsh: ./build.ps1 --target=dotnet-samples --configuration="${{ parameters.configuration }}" --${{ parameters.platform }} --verbosity=diagnostic --usenuget=false
|
||||
- pwsh: ./build.ps1 --target=uitests-apphost --configuration="${{ parameters.configuration }}" --${{ parameters.platform }} --verbosity=diagnostic --usenuget=false
|
||||
displayName: 'Build the samples'
|
||||
|
||||
- bash: |
|
||||
|
|
Загрузка…
Ссылка в новой задаче