Skip to content

Commit

Permalink
Merge branch 'dotnet:main' into 19109-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
praveenkumarkarunanithi authored Jan 27, 2025
2 parents b8b11ff + 4504a68 commit 096918a
Show file tree
Hide file tree
Showing 385 changed files with 5,202 additions and 1,796 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
]
},
"microsoft.dotnet.xharness.cli": {
"version": "9.0.0-prerelease.25057.1",
"version": "9.0.0-prerelease.25064.5",
"commands": [
"xharness"
]
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/add-remove-label-check-suites.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# When all check suites are completed successfully, the workflow adds a label to the pull request.
# When a new check suite is requested (or rerequested), the workflow removes the label from the pull request.
name: Manage Label on Check Suites

on:
check_suite:
types: [completed, requested, rerequested]

jobs:
add-label:
if: github.event.action == 'completed'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Check if all check suites are successful
id: check_suites
uses: actions/github-script@v6
with:
script: |
const { data: checkSuites } = await github.checks.listSuitesForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.payload.check_suite.head_sha,
});
const allSuccessful = checkSuites.check_suites.every(
suite => suite.conclusion === 'success' || suite.conclusion === 'skipped');
if (allSuccessful) {
return { success: true };
} else {
return { success: false };
}
- name: Add label if all check suites are successful
if: steps.check_suites.outputs.success == 'true'
uses: actions/github-script@v6
with:
script: |
const pullRequest = context.payload.check_suite.pull_requests[0];
if (pullRequest) {
github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequest.number,
labels: 'all-checks-passed',
});
}
remove-label:
if: github.event.action == 'requested' || github.event.action == 'rerequested'
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Remove label when check suite is triggered or re-requested
uses: actions/github-script@v6
with:
script: |
const pullRequest = context.payload.check_suite.pull_requests[0];
if (pullRequest) {
github.issues.removeLabel({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pullRequest.number,
name: 'all-checks-passed',
});
}
10 changes: 10 additions & 0 deletions eng/NuGetVersions.targets
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,16 @@
Update="System.Drawing.Common"
Version="$(SystemDrawingCommonPackageVersion)"
/>
<PackageReference
Update="Microsoft.Build.Framework"
Version="$(MicrosoftBuildFrameworkPackageVersion)"
PrivateAssets="All"
/>
<PackageReference
Update="Microsoft.Build.Utilities.Core"
Version="$(MicrosoftBuildUtilitiesCorePackageVersion)"
PrivateAssets="All"
/>

<PackageReference Update="Microsoft.DotNet.Build.Tasks.Workloads" Version="$(MicrosoftDotNetBuildTasksWorkloadsPackageVersion)" />
<PackageReference Update="Microsoft.Signed.WiX" Version="$(MicrosoftSignedWixVersion)" />
Expand Down
12 changes: 6 additions & 6 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="9.0.0-prerelease.25057.1">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Common" Version="9.0.0-prerelease.25064.5">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>b19a0fbe866756907e546ed927b013687689b4ee</Sha>
<Sha>520ad31fc073a41fd38417e3118e9da9fdefdecc</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="9.0.0-prerelease.25057.1">
<Dependency Name="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="9.0.0-prerelease.25064.5">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>b19a0fbe866756907e546ed927b013687689b4ee</Sha>
<Sha>520ad31fc073a41fd38417e3118e9da9fdefdecc</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="9.0.0-prerelease.25057.1">
<Dependency Name="Microsoft.DotNet.XHarness.CLI" Version="9.0.0-prerelease.25064.5">
<Uri>https://github.com/dotnet/xharness</Uri>
<Sha>b19a0fbe866756907e546ed927b013687689b4ee</Sha>
<Sha>520ad31fc073a41fd38417e3118e9da9fdefdecc</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
8 changes: 5 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@
<SystemIOUnmanagedMemoryStreamPackageVersion>4.3.0</SystemIOUnmanagedMemoryStreamPackageVersion>
<SystemObjectModelPackageVersion>4.3.0</SystemObjectModelPackageVersion>
<SystemRuntimeCompilerServicesUnsafePackageVersion>6.0.0</SystemRuntimeCompilerServicesUnsafePackageVersion>
<MicrosoftBuildFrameworkPackageVersion>17.9.5</MicrosoftBuildFrameworkPackageVersion>
<MicrosoftBuildUtilitiesCorePackageVersion>17.9.5</MicrosoftBuildUtilitiesCorePackageVersion>
<!-- GLIDE - the android maven artifact in /src/Core/AndroidNative/maui/build.gradle -->
<!-- must be kept in sync with the binding library version to it here: -->
<_XamarinAndroidGlideVersion>4.16.0.6</_XamarinAndroidGlideVersion>
Expand All @@ -123,9 +125,9 @@
<_HarfBuzzSharpVersion>7.3.0.2</_HarfBuzzSharpVersion>
<_SkiaSharpNativeAssetsVersion>0.0.0-commit.7af1d0840a381c0ce7ef2877454a88dbb2949686.1086</_SkiaSharpNativeAssetsVersion>
<MicrosoftTemplateEngineTasksVersion>7.0.120</MicrosoftTemplateEngineTasksVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>9.0.0-prerelease.25057.1</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>9.0.0-prerelease.25057.1</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>9.0.0-prerelease.25057.1</MicrosoftDotNetXHarnessCLIVersion>
<MicrosoftDotNetXHarnessTestRunnersCommonVersion>9.0.0-prerelease.25064.5</MicrosoftDotNetXHarnessTestRunnersCommonVersion>
<MicrosoftDotNetXHarnessTestRunnersXunitVersion>9.0.0-prerelease.25064.5</MicrosoftDotNetXHarnessTestRunnersXunitVersion>
<MicrosoftDotNetXHarnessCLIVersion>9.0.0-prerelease.25064.5</MicrosoftDotNetXHarnessCLIVersion>
<TizenUIExtensionsVersion>0.9.2</TizenUIExtensionsVersion>
<SvgSkiaPackageVersion>1.0.0.16</SvgSkiaPackageVersion>
<FizzlerPackageVersion>1.3.0</FizzlerPackageVersion>
Expand Down
8 changes: 4 additions & 4 deletions eng/pipelines/common/provision.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ steps:
AUTH_TOKEN_GITHUB_COM: $(github--pat--vs-mobiletools-engineering-service2)
# Provision Xcode
- ${{ if ne(parameters.skipXcode, 'true') }}:
- ${{ if eq(variables['System.TeamProject'], 'devdiv') }}:
- task: xamops.azdevex.provisionator-task.provisionator@2
- ${{ if ne(parameters.skipProvisionator, true) }}:
- task: xamops.azdevex.provisionator-task.provisionator@3
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
displayName: 'Provision Xcode'
inputs:
Expand Down Expand Up @@ -69,7 +69,7 @@ steps:
# Provision Additional Software
- ${{ if ne(parameters.skipProvisionator, true) }}:
# Prepare macOS
- task: xamops.azdevex.provisionator-task.provisionator@2
- task: xamops.azdevex.provisionator-task.provisionator@3
displayName: 'Provision Additional Software'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
continueOnError: true
Expand All @@ -88,7 +88,7 @@ steps:
INSTALL_DEFAULT_ANDROID_API: 'true'

# Prepare Windows
- task: xamops.azdevex.provisionator-task.provisionator@2
- task: xamops.azdevex.provisionator-task.provisionator@3
displayName: 'Provision Additional Software'
condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
inputs:
Expand Down
4 changes: 3 additions & 1 deletion eng/pipelines/common/setup-jdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ steps:
jdkPath="${{ parameters.jdkFolder }}"
echo "Using provided JDK folder: $jdkPath"
else
jdkPath=$(/usr/libexec/java_home -V 2>&1 | grep -E "${{ parameters.jdkMajorVersion }}.jdk" | head -n 1 | awk '{print $NF}')
echo "Installed JDKs:"
/usr/libexec/java_home -V
jdkPath=$(/usr/libexec/java_home -V 2>&1 | grep -E "${{ parameters.jdkMajorVersion }}.*jdk" | head -n 1 | awk '{print $NF}')
if [ -n "$jdkPath" ]; then
echo "Found JDK path: $jdkPath"
else
Expand Down
2 changes: 1 addition & 1 deletion eng/pipelines/common/ui-tests-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ steps:
inputs:
testResultsFormat: VSTest
testResultsFiles: '$(TestResultsDirectory)/*.trx'
testRunTitle: '$(System.PhaseName)'
testRunTitle: '${{ parameters.testFilter }}_$(System.PhaseName)'
failTaskOnFailedTests: true

- task: PublishBuildArtifacts@1
Expand Down
81 changes: 67 additions & 14 deletions eng/pipelines/common/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,72 @@ parameters:
categoryGroupsToTest:
# Make sure that this list is always up-to-date with src/Controls/tests/TestCases.Shared.Tests/UITestCategories.cs
# we might want to improve this somehow depending on how much the categories change over time
- 'Accessibility,ActionSheet,ActivityIndicator,Animation,AppLinks'
- 'Border,BoxView,Brush,Button'
- 'CarouselView,Cells,CheckBox,CollectionView,ContextActions,CustomRenderers'
- 'DatePicker,Dispatcher,DisplayAlert,DisplayPrompt,DragAndDrop'
- 'Editor,Effects,Entry,FlyoutPage,Focus,Fonts,Frame,Gestures,GraphicsView'
- 'Image,ImageButton,IndicatorView,InputTransparent,IsEnabled,IsVisible'
- 'Label,Layout,Lifecycle,ListView'
- 'ManualReview,Maps,Navigation'
- 'Page,Performance,Picker,ProgressBar'
- 'RadioButton,RefreshView'
- 'ScrollView,SearchBar,Shape,Shell,Slider,SoftInput,Stepper,Switch,SwipeView'
- 'TabbedPage,TableView,TimePicker,TitleView,ToolbarItem'
- 'ViewBaseTests,Visual,WebView,Window'
- Accessibility
- ActionSheet
- ActivityIndicator
- Animation
- AppLinks
- Border
- BoxView
- Brush
- Button
- CarouselView
- Cells
- CheckBox
- CollectionView
- ContextActions
- CustomRenderers
- DatePicker
- Dispatcher
- DisplayAlert
- DisplayPrompt
- DragAndDrop
- Editor
- Effects
- Entry
- FlyoutPage
- Focus
- Fonts
- Frame
- Gestures
- GraphicsView
- Image
- ImageButton
- IndicatorView
- InputTransparent
- IsEnabled
- IsVisible
- Label
- Layout
- Lifecycle
- ListView
- ManualReview
- Maps
- Navigation
- Page
- Performance
- Picker
- ProgressBar
- RadioButton
- RefreshView
- ScrollView
- SearchBar
- Shape
- Shell
- Slider
- SoftInput
- Stepper
- SwipeView
- Switch
- TabbedPage
- TableView
- TimePicker
- TitleView
- ToolbarItem
- ViewBaseTests
- Visual
- WebView
- Window

projects:
- name: name
Expand Down Expand Up @@ -173,7 +226,7 @@ stages:
- ${{ if ne(project.ios, '') }}:
- ${{ each version in parameters.iosVersions }}:
- ${{ if not(containsValue(project.iosVersionsExclude, version)) }}:
- job: ios_ui_tests_mono_${{ project.name }}_${{ replace(version, '.', '_') }}
- job: CV2_ios_ui_tests_mono_${{ project.name }}_${{ replace(version, '.', '_') }}
timeoutInMinutes: 240 # how long to run the job before automatically cancelling
workspace:
clean: all
Expand Down
23 changes: 23 additions & 0 deletions eng/scripts/appium-install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,27 @@ npm cache clean --force
$existingDrivers = appium driver list --installed --json | ConvertFrom-Json
Write-Output "List of installed drivers $existingDrivers"

$exitCode = 0

function Check-ExitCode {
param (
[int]$code
)
if ($code -ne 0 -and $exitCode -eq 0) {
$exitCode = $code
}
}

if ($IsWindows) {
if ($existingDrivers.windows) {
Write-Output "Updating appium driver windows"
appium driver update windows
Check-ExitCode $LASTEXITCODE
Write-Output "Updated appium driver windows"
} else {
Write-Output "Installing appium driver windows"
appium driver install --source=npm appium-windows-driver@$windowsDriverVersion
Check-ExitCode $LASTEXITCODE
Write-Output "Installed appium driver windows"
}
}
Expand All @@ -166,30 +179,36 @@ if ($IsMacOS) {
if ($existingDrivers.xcuitest) {
Write-Output "Updating appium driver xcuitest"
appium driver update xcuitest
Check-ExitCode $LASTEXITCODE
Write-Output "Updated appium driver xcuitest"
} else {
Write-Output "Installing appium driver xcuitest"
appium driver install xcuitest@$iOSDriverVersion
Check-ExitCode $LASTEXITCODE
Write-Output "Installed appium driver xcuitest"
}
if ($existingDrivers.mac2) {
Write-Output "Updating appium driver mac2"
appium driver update mac2
Check-ExitCode $LASTEXITCODE
Write-Output "Updated appium driver mac2"
} else {
Write-Output "Installing appium driver mac2"
appium driver install mac2@$macDriverVersion
Check-ExitCode $LASTEXITCODE
Write-Output "Installed appium driver mac2"
}
}

if ($existingDrivers.uiautomator2) {
Write-Output "Updating appium driver uiautomator2"
appium driver update uiautomator2
Check-ExitCode $LASTEXITCODE
Write-Output "Updated appium driver uiautomator2"
} else {
Write-Output "Installing appium driver uiautomator2"
appium driver install uiautomator2@$androidDriverVersion
Check-ExitCode $LASTEXITCODE
Write-Output "Installed appium driver uiautomator2"
}

Expand All @@ -208,4 +227,8 @@ if ($IsMacOS) {

appium driver doctor uiautomator2

if ($exitCode -ne 0) {
throw "One or more Appium driver installations failed. Please check the logs for more information."
}

Write-Output "Done, thanks!"
Loading

0 comments on commit 096918a

Please sign in to comment.