From 1aef1e428fa35e50566818f435319a9ead9b21dd Mon Sep 17 00:00:00 2001 From: rahulpsq <81632139+rahulpsq@users.noreply.github.com> Date: Tue, 24 Dec 2024 12:59:05 +0530 Subject: [PATCH 01/28] Update sanity-workflow.yml --- .github/workflows/sanity-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 0b8f18b..4730f6e 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -15,7 +15,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: fail-fast: false - max-parallel: 3 + max-parallel: 1 matrix: dotnet: ['7.0.x', '6.0.x', '5.0.x'] os: [ windows-latest ] From 3792df289514855bfaeefe25e7efed6fdbcf8da4 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 13:18:49 +0530 Subject: [PATCH 02/28] added fix --- .github/workflows/sanity-workflow.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 4730f6e..242b165 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -53,27 +53,47 @@ jobs: dotnet-version: ${{ matrix.dotnet }} - name: Install dependencies - run: dotnet build + shell: pwsh + run: | + dotnet nuget locals all --clear + if (Test-Path "*.nupkg") { + Remove-Item "*.nupkg" -Force + } + if (Test-Path "build.lock") { + Remove-Item "build.lock" -Force + } + Get-ChildItem -Include bin,obj -Recurse | Remove-Item -Recurse -Force + dotnet restore --force --no-cache + dotnet clean + dotnet build - name: Run sample android tests + shell: pwsh run: | + Start-Sleep -Seconds 5 cd android dotnet test --filter "Category=sample-test" - name: Run local android tests + shell: pwsh run: | + Start-Sleep -Seconds 5 cd android dotnet test --filter "Category=sample-local-test" env: BROWSERSTACK_APP: ./LocalSample.apk - name: Run sample ios tests + shell: pwsh run: | + Start-Sleep -Seconds 5 cd ios dotnet test --filter "Category=sample-test" - name: Run local ios tests + shell: pwsh run: | + Start-Sleep -Seconds 5 cd ios dotnet test --filter "Category=sample-local-test" env: From 0d027992f03601bbb7c4bac97f690e4a3074319b Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 15:43:35 +0530 Subject: [PATCH 03/28] added fixes --- .github/workflows/sanity-workflow.yml | 65 ++++++++++++++++++++++----- 1 file changed, 54 insertions(+), 11 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 242b165..bc513fe 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -1,6 +1,5 @@ # This job is to test different profiles in sdk branch against full commit id # This workflow targets nunit - name: C-sharp SDK Test workflow on workflow_dispatch on: @@ -28,6 +27,7 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.commit_sha }} + - uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 id: status-check-in-progress env: @@ -47,6 +47,7 @@ jobs: if (result.status !== 201) { console.log('Failed to create check run') } + - name: Setup dotnet uses: actions/setup-dotnet@v3 with: @@ -55,29 +56,71 @@ jobs: - name: Install dependencies shell: pwsh run: | + Write-Host "Stopping any running dotnet processes..." + Get-Process dotnet -ErrorAction SilentlyContinue | Stop-Process -Force + + Write-Host "Clearing template cache..." + if (Test-Path "C:\Users\runneradmin\.templateengine") { + Remove-Item "C:\Users\runneradmin\.templateengine" -Recurse -Force -ErrorAction SilentlyContinue + } + + Write-Host "Clearing NuGet caches and packages..." dotnet nuget locals all --clear if (Test-Path "*.nupkg") { - Remove-Item "*.nupkg" -Force + Start-Sleep -Seconds 5 # Wait for file release + Remove-Item "*.nupkg" -Force -ErrorAction SilentlyContinue } + + Write-Host "Removing lock files..." if (Test-Path "build.lock") { - Remove-Item "build.lock" -Force + Remove-Item "build.lock" -Force -ErrorAction SilentlyContinue + } + + Write-Host "Cleaning build artifacts..." + Get-ChildItem -Include bin,obj -Recurse | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue + + $maxAttempts = 3 + $attempt = 0 + $success = $false + + while (-not $success -and $attempt -lt $maxAttempts) { + $attempt++ + try { + Write-Host "Build attempt $attempt of $maxAttempts" + + Write-Host "Restoring dependencies..." + dotnet restore --force --no-cache + Start-Sleep -Seconds 5 # Wait between operations + + Write-Host "Cleaning solution..." + dotnet clean + Start-Sleep -Seconds 5 # Wait between operations + + Write-Host "Building solution..." + dotnet build + $success = $true + } + catch { + Write-Host "Attempt $attempt failed: $_" + Start-Sleep -Seconds 10 # Wait before retry + } + } + + if (-not $success) { + throw "Build failed after $maxAttempts attempts" } - Get-ChildItem -Include bin,obj -Recurse | Remove-Item -Recurse -Force - dotnet restore --force --no-cache - dotnet clean - dotnet build - name: Run sample android tests shell: pwsh run: | - Start-Sleep -Seconds 5 + Start-Sleep -Seconds 5 # Prevent file access conflicts cd android dotnet test --filter "Category=sample-test" - name: Run local android tests shell: pwsh run: | - Start-Sleep -Seconds 5 + Start-Sleep -Seconds 5 # Prevent file access conflicts cd android dotnet test --filter "Category=sample-local-test" env: @@ -86,14 +129,14 @@ jobs: - name: Run sample ios tests shell: pwsh run: | - Start-Sleep -Seconds 5 + Start-Sleep -Seconds 5 # Prevent file access conflicts cd ios dotnet test --filter "Category=sample-test" - name: Run local ios tests shell: pwsh run: | - Start-Sleep -Seconds 5 + Start-Sleep -Seconds 5 # Prevent file access conflicts cd ios dotnet test --filter "Category=sample-local-test" env: From c145ffe0337c1e54b62de4030dbe54459ac81b26 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 15:57:57 +0530 Subject: [PATCH 04/28] added fixes --- .github/workflows/sanity-workflow.yml | 106 +++++++++++++++++++------- 1 file changed, 78 insertions(+), 28 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index bc513fe..0bdabc6 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -56,29 +56,84 @@ jobs: - name: Install dependencies shell: pwsh run: | - Write-Host "Stopping any running dotnet processes..." - Get-Process dotnet -ErrorAction SilentlyContinue | Stop-Process -Force + # Function to clean packages + function Clean-Project { + param ( + [string]$projectPath + ) + Write-Host "Cleaning project in: $projectPath" + Push-Location $projectPath + + # Kill any processes that might be locking files + Get-Process dotnet -ErrorAction SilentlyContinue | Stop-Process -Force + + # Remove NuGet packages + if (Test-Path "*.nupkg") { + Write-Host "Removing .nupkg files..." + Get-ChildItem "*.nupkg" | ForEach-Object { + $retryCount = 0 + $maxRetries = 3 + do { + try { + Remove-Item $_.FullName -Force + break + } + catch { + $retryCount++ + Write-Host "Failed to remove $($_.Name), attempt $retryCount of $maxRetries" + Start-Sleep -Seconds 5 + } + } while ($retryCount -lt $maxRetries) + } + } + + # Clean build artifacts + if (Test-Path "bin") { Remove-Item "bin" -Recurse -Force -ErrorAction SilentlyContinue } + if (Test-Path "obj") { Remove-Item "obj" -Recurse -Force -ErrorAction SilentlyContinue } + + Pop-Location + } - Write-Host "Clearing template cache..." - if (Test-Path "C:\Users\runneradmin\.templateengine") { - Remove-Item "C:\Users\runneradmin\.templateengine" -Recurse -Force -ErrorAction SilentlyContinue + # Function to build project + function Build-Project { + param ( + [string]$projectPath + ) + Write-Host "Building project in: $projectPath" + Push-Location $projectPath + + try { + dotnet restore --force --no-cache + Start-Sleep -Seconds 5 + dotnet clean + Start-Sleep -Seconds 5 + dotnet build --no-restore + } + finally { + Pop-Location + } } - Write-Host "Clearing NuGet caches and packages..." + # Clear global NuGet cache + Write-Host "Clearing NuGet cache..." dotnet nuget locals all --clear - if (Test-Path "*.nupkg") { - Start-Sleep -Seconds 5 # Wait for file release - Remove-Item "*.nupkg" -Force -ErrorAction SilentlyContinue - } - Write-Host "Removing lock files..." - if (Test-Path "build.lock") { - Remove-Item "build.lock" -Force -ErrorAction SilentlyContinue + # Clean template cache + if (Test-Path "C:\Users\runneradmin\.templateengine") { + Remove-Item "C:\Users\runneradmin\.templateengine" -Recurse -Force -ErrorAction SilentlyContinue } - Write-Host "Cleaning build artifacts..." - Get-ChildItem -Include bin,obj -Recurse | Remove-Item -Recurse -Force -ErrorAction SilentlyContinue + # Process each project + Write-Host "Processing Android project..." + Clean-Project "android" + Start-Sleep -Seconds 5 + + Write-Host "Processing iOS project..." + Clean-Project "ios" + Start-Sleep -Seconds 5 + # Build solution + Write-Host "Building solution..." $maxAttempts = 3 $attempt = 0 $success = $false @@ -87,29 +142,24 @@ jobs: $attempt++ try { Write-Host "Build attempt $attempt of $maxAttempts" - - Write-Host "Restoring dependencies..." - dotnet restore --force --no-cache - Start-Sleep -Seconds 5 # Wait between operations - - Write-Host "Cleaning solution..." - dotnet clean - Start-Sleep -Seconds 5 # Wait between operations - - Write-Host "Building solution..." - dotnet build + Build-Project "android" + Start-Sleep -Seconds 10 + Build-Project "ios" $success = $true } catch { Write-Host "Attempt $attempt failed: $_" - Start-Sleep -Seconds 10 # Wait before retry + Start-Sleep -Seconds 15 + # Clean again before retry + Clean-Project "android" + Clean-Project "ios" } } if (-not $success) { throw "Build failed after $maxAttempts attempts" } - + - name: Run sample android tests shell: pwsh run: | From 76a350265359be65e82b0d826901b77a2e9adb89 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 16:22:31 +0530 Subject: [PATCH 05/28] added fixes --- .github/workflows/sanity-workflow.yml | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 0bdabc6..ee76598 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -159,13 +159,30 @@ jobs: if (-not $success) { throw "Build failed after $maxAttempts attempts" } - + - name: Run sample android tests shell: pwsh run: | - Start-Sleep -Seconds 5 # Prevent file access conflicts + Write-Host "Current directory: $(Get-Location)" cd android - dotnet test --filter "Category=sample-test" + Write-Host "Changed to android directory: $(Get-Location)" + # List test assemblies + Write-Host "Test assemblies found:" + Get-ChildItem -Recurse -Filter "*.dll" | Where-Object { $_.FullName -like "*\bin\Debug\*" } + + # Run tests with discovery + dotnet test --list-tests + Write-Host "Running sample tests..." + dotnet test --filter "Category=sample-test" ` + --verbosity detailed ` + --logger "console;verbosity=detailed" ` + --logger "trx;LogFileName=sample-test-results.trx" ` + --no-build ` + --blame-hang-timeout 120s + env: + BROWSERSTACK_APP: ./WikipediaSample.apk + BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} + BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - name: Run local android tests shell: pwsh From f6030b501b753df2b06f04e918e7c6a92e0e3aba Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 16:59:59 +0530 Subject: [PATCH 06/28] added fixes --- .github/workflows/sanity-workflow.yml | 134 +++----------------------- 1 file changed, 12 insertions(+), 122 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index ee76598..699b6f8 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -11,14 +11,13 @@ on: jobs: comment-run: - runs-on: ${{ matrix.os }} + runs-on: windows-latest strategy: fail-fast: false max-parallel: 1 matrix: - dotnet: ['7.0.x', '6.0.x', '5.0.x'] - os: [ windows-latest ] - name: NUnit Appium Repo ${{ matrix.dotnet }} - ${{ matrix.os }} Sample + dotnet: ['6.0.x'] + name: NUnit Appium Repo ${{ matrix.dotnet }} Sample env: BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} @@ -52,133 +51,24 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ matrix.dotnet }} + + - name: Install required workloads + run: dotnet workload restore - - name: Install dependencies - shell: pwsh + - name: Restore dependencies and build run: | - # Function to clean packages - function Clean-Project { - param ( - [string]$projectPath - ) - Write-Host "Cleaning project in: $projectPath" - Push-Location $projectPath - - # Kill any processes that might be locking files - Get-Process dotnet -ErrorAction SilentlyContinue | Stop-Process -Force - - # Remove NuGet packages - if (Test-Path "*.nupkg") { - Write-Host "Removing .nupkg files..." - Get-ChildItem "*.nupkg" | ForEach-Object { - $retryCount = 0 - $maxRetries = 3 - do { - try { - Remove-Item $_.FullName -Force - break - } - catch { - $retryCount++ - Write-Host "Failed to remove $($_.Name), attempt $retryCount of $maxRetries" - Start-Sleep -Seconds 5 - } - } while ($retryCount -lt $maxRetries) - } - } - - # Clean build artifacts - if (Test-Path "bin") { Remove-Item "bin" -Recurse -Force -ErrorAction SilentlyContinue } - if (Test-Path "obj") { Remove-Item "obj" -Recurse -Force -ErrorAction SilentlyContinue } - - Pop-Location - } - - # Function to build project - function Build-Project { - param ( - [string]$projectPath - ) - Write-Host "Building project in: $projectPath" - Push-Location $projectPath - - try { - dotnet restore --force --no-cache - Start-Sleep -Seconds 5 - dotnet clean - Start-Sleep -Seconds 5 - dotnet build --no-restore - } - finally { - Pop-Location - } - } - - # Clear global NuGet cache - Write-Host "Clearing NuGet cache..." + cd android dotnet nuget locals all --clear - - # Clean template cache - if (Test-Path "C:\Users\runneradmin\.templateengine") { - Remove-Item "C:\Users\runneradmin\.templateengine" -Recurse -Force -ErrorAction SilentlyContinue - } - - # Process each project - Write-Host "Processing Android project..." - Clean-Project "android" - Start-Sleep -Seconds 5 - - Write-Host "Processing iOS project..." - Clean-Project "ios" - Start-Sleep -Seconds 5 - - # Build solution - Write-Host "Building solution..." - $maxAttempts = 3 - $attempt = 0 - $success = $false - - while (-not $success -and $attempt -lt $maxAttempts) { - $attempt++ - try { - Write-Host "Build attempt $attempt of $maxAttempts" - Build-Project "android" - Start-Sleep -Seconds 10 - Build-Project "ios" - $success = $true - } - catch { - Write-Host "Attempt $attempt failed: $_" - Start-Sleep -Seconds 15 - # Clean again before retry - Clean-Project "android" - Clean-Project "ios" - } - } - - if (-not $success) { - throw "Build failed after $maxAttempts attempts" - } + dotnet restore + dotnet build + working-directory: ./android - name: Run sample android tests shell: pwsh run: | Write-Host "Current directory: $(Get-Location)" cd android - Write-Host "Changed to android directory: $(Get-Location)" - # List test assemblies - Write-Host "Test assemblies found:" - Get-ChildItem -Recurse -Filter "*.dll" | Where-Object { $_.FullName -like "*\bin\Debug\*" } - - # Run tests with discovery - dotnet test --list-tests - Write-Host "Running sample tests..." - dotnet test --filter "Category=sample-test" ` - --verbosity detailed ` - --logger "console;verbosity=detailed" ` - --logger "trx;LogFileName=sample-test-results.trx" ` - --no-build ` - --blame-hang-timeout 120s + dotnet test --filter "Category=sample-test" env: BROWSERSTACK_APP: ./WikipediaSample.apk BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} From 1661cfc1cb5d985d67b4a0ba796687570d86af5a Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 17:08:52 +0530 Subject: [PATCH 07/28] added fixes --- .github/workflows/sanity-workflow.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 699b6f8..0c95de7 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -57,7 +57,6 @@ jobs: - name: Restore dependencies and build run: | - cd android dotnet nuget locals all --clear dotnet restore dotnet build From d10361bf557af9eda25d141d54c3ba3311aa31e1 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 18:21:42 +0530 Subject: [PATCH 08/28] added fixes --- .github/workflows/sanity-workflow.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 0c95de7..b349529 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -62,6 +62,11 @@ jobs: dotnet build working-directory: ./android + - name: List iOS tests + run: | + cd ios + dotnet test --list-tests --verbosity detailed + - name: Run sample android tests shell: pwsh run: | From b67819c11bc0286ee4c0f274f2384966e0fdab7e Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 18:24:05 +0530 Subject: [PATCH 09/28] added fixes --- .github/workflows/sanity-workflow.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index b349529..b369c93 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -62,11 +62,11 @@ jobs: dotnet build working-directory: ./android - - name: List iOS tests + - name: List android tests run: | - cd ios + cd android dotnet test --list-tests --verbosity detailed - + - name: Run sample android tests shell: pwsh run: | From 83fe4eadebac57fe480e2d89c457da08ae73652b Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 18:34:39 +0530 Subject: [PATCH 10/28] added fixes --- .github/workflows/sanity-workflow.yml | 28 +++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index b369c93..7244ab0 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - dotnet: ['6.0.x'] + dotnet: ['6.0.417'] name: NUnit Appium Repo ${{ matrix.dotnet }} Sample env: BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} @@ -52,15 +52,31 @@ jobs: with: dotnet-version: ${{ matrix.dotnet }} - - name: Install required workloads - run: dotnet workload restore + - name: Install workload manifests + shell: pwsh + run: | + Write-Host "Installing .NET workloads..." + dotnet new --install Microsoft.NET.Workload.Android + dotnet workload install android + dotnet workload install maui-android + dotnet workload restore + Write-Host "Workloads installed successfully" - name: Restore dependencies and build + shell: pwsh run: | + Write-Host "Current directory: $(Get-Location)" + cd android + Write-Host "Changed to android directory: $(Get-Location)" + + Write-Host "Clearing NuGet cache..." dotnet nuget locals all --clear - dotnet restore - dotnet build - working-directory: ./android + + Write-Host "Restoring dependencies..." + dotnet restore --verbosity detailed + + Write-Host "Building project..." + dotnet build --no-restore --verbosity detailed - name: List android tests run: | From d3cdbde9583e26f7d0ae53c45c6b66317e0a071c Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 18:53:35 +0530 Subject: [PATCH 11/28] added fixes --- .github/workflows/sanity-workflow.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 7244ab0..e224685 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - dotnet: ['6.0.417'] + dotnet: ['6.0.419'] name: NUnit Appium Repo ${{ matrix.dotnet }} Sample env: BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} @@ -61,22 +61,31 @@ jobs: dotnet workload install maui-android dotnet workload restore Write-Host "Workloads installed successfully" + + - name: Install MAUI workload + run: | + dotnet nuget locals all --clear + dotnet tool install -g redth.net.maui.check + dotnet workload install maui --skip-manifest-update + dotnet workload install android --skip-manifest-update + dotnet workload list + + - name: Print dotnet info + run: | + dotnet --info + dotnet --version - name: Restore dependencies and build shell: pwsh run: | Write-Host "Current directory: $(Get-Location)" cd android - Write-Host "Changed to android directory: $(Get-Location)" - - Write-Host "Clearing NuGet cache..." - dotnet nuget locals all --clear Write-Host "Restoring dependencies..." dotnet restore --verbosity detailed Write-Host "Building project..." - dotnet build --no-restore --verbosity detailed + dotnet msbuild -p:TargetFramework=net6.0-android -restore -t:Build -verbosity:detailed - name: List android tests run: | From 1abfb60e41e8b669830755dc49b2257a5cfeb24b Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Tue, 24 Dec 2024 19:12:58 +0530 Subject: [PATCH 12/28] added fixes --- .github/workflows/sanity-workflow.yml | 51 +++++++-------------------- 1 file changed, 13 insertions(+), 38 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index e224685..1ab0caf 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - dotnet: ['6.0.419'] + dotnet: ['6.0.x'] name: NUnit Appium Repo ${{ matrix.dotnet }} Sample env: BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} @@ -51,57 +51,32 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: ${{ matrix.dotnet }} - - - name: Install workload manifests - shell: pwsh - run: | - Write-Host "Installing .NET workloads..." - dotnet new --install Microsoft.NET.Workload.Android - dotnet workload install android - dotnet workload install maui-android - dotnet workload restore - Write-Host "Workloads installed successfully" - - - name: Install MAUI workload - run: | - dotnet nuget locals all --clear - dotnet tool install -g redth.net.maui.check - dotnet workload install maui --skip-manifest-update - dotnet workload install android --skip-manifest-update - dotnet workload list - - - name: Print dotnet info + + - name: Clear NuGet cache + run: dotnet nuget locals all --clear + + - name: Install test adapters run: | - dotnet --info - dotnet --version + dotnet add android/android.csproj package Microsoft.NET.Test.Sdk + dotnet add android/android.csproj package NUnit3TestAdapter - - name: Restore dependencies and build + - name: Build and Test Android shell: pwsh run: | Write-Host "Current directory: $(Get-Location)" cd android - - Write-Host "Restoring dependencies..." - dotnet restore --verbosity detailed - Write-Host "Building project..." - dotnet msbuild -p:TargetFramework=net6.0-android -restore -t:Build -verbosity:detailed - - - name: List android tests - run: | - cd android - dotnet test --list-tests --verbosity detailed + dotnet build --configuration Release + Write-Host "Running tests..." + dotnet test --no-build --configuration Release --verbosity normal - name: Run sample android tests shell: pwsh run: | - Write-Host "Current directory: $(Get-Location)" cd android - dotnet test --filter "Category=sample-test" + dotnet test --filter "Category=sample-test" --verbosity normal env: BROWSERSTACK_APP: ./WikipediaSample.apk - BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} - BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - name: Run local android tests shell: pwsh From 66f600c7d3eef4badd625e42889dfa9d37c22c1f Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Wed, 25 Dec 2024 14:25:58 +0530 Subject: [PATCH 13/28] added fix --- .github/workflows/sanity-workflow.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 1ab0caf..6b372b8 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -54,11 +54,18 @@ jobs: - name: Clear NuGet cache run: dotnet nuget locals all --clear + + - name: Restore dependencies + run: | + cd android + dotnet restore - name: Install test adapters run: | dotnet add android/android.csproj package Microsoft.NET.Test.Sdk + dotnet add android/android.csproj package NUnit dotnet add android/android.csproj package NUnit3TestAdapter + dotnet add android/android.csproj package Microsoft.TestPlatform.TestHost - name: Build and Test Android shell: pwsh @@ -68,7 +75,7 @@ jobs: Write-Host "Building project..." dotnet build --configuration Release Write-Host "Running tests..." - dotnet test --no-build --configuration Release --verbosity normal + dotnet test --no-build --configuration Release --verbosity diagnostic - name: Run sample android tests shell: pwsh From 35be8811903cfb2ad3c2a7a2265c6dfaf564bfc4 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Wed, 25 Dec 2024 14:37:54 +0530 Subject: [PATCH 14/28] added fix --- .github/workflows/sanity-workflow.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 6b372b8..16bc6dc 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -50,7 +50,13 @@ jobs: - name: Setup dotnet uses: actions/setup-dotnet@v3 with: - dotnet-version: ${{ matrix.dotnet }} + dotnet-version: '6.0.x' + include-prerelease: false + + - name: Install .NET workloads + run: | + dotnet workload install android + dotnet workload install ios - name: Clear NuGet cache run: dotnet nuget locals all --clear @@ -58,14 +64,7 @@ jobs: - name: Restore dependencies run: | cd android - dotnet restore - - - name: Install test adapters - run: | - dotnet add android/android.csproj package Microsoft.NET.Test.Sdk - dotnet add android/android.csproj package NUnit - dotnet add android/android.csproj package NUnit3TestAdapter - dotnet add android/android.csproj package Microsoft.TestPlatform.TestHost + dotnet restore --verbosity detailed - name: Build and Test Android shell: pwsh @@ -75,7 +74,7 @@ jobs: Write-Host "Building project..." dotnet build --configuration Release Write-Host "Running tests..." - dotnet test --no-build --configuration Release --verbosity diagnostic + dotnet test --no-build --configuration Release --verbosity normal - name: Run sample android tests shell: pwsh From 6e66a40fb9436c11235732a6fbcf86fe9d03fa80 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Wed, 25 Dec 2024 14:55:08 +0530 Subject: [PATCH 15/28] added fix --- .github/workflows/sanity-workflow.yml | 29 ++++++++++++++------------- android/android.csproj | 1 + 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 16bc6dc..3bd1c10 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -53,36 +53,37 @@ jobs: dotnet-version: '6.0.x' include-prerelease: false + - name: Setup BrowserStack + run: | + dotnet new tool-manifest + dotnet tool install BrowserStack.TestAdapter.Dotnet.Tool + dotnet tool restore + - name: Install .NET workloads run: | dotnet workload install android dotnet workload install ios - - name: Clear NuGet cache - run: dotnet nuget locals all --clear - - - name: Restore dependencies + - name: Clear NuGet cache and restore run: | + dotnet nuget locals all --clear cd android dotnet restore --verbosity detailed - - - name: Build and Test Android - shell: pwsh + + - name: Build project run: | - Write-Host "Current directory: $(Get-Location)" cd android - Write-Host "Building project..." dotnet build --configuration Release - Write-Host "Running tests..." - dotnet test --no-build --configuration Release --verbosity normal - - name: Run sample android tests + - name: Run tests with detailed logging shell: pwsh run: | cd android - dotnet test --filter "Category=sample-test" --verbosity normal - env: + dotnet test --no-build --configuration Release --verbosity detailed --logger "console;verbosity=detailed" --filter "Category=sample-test" + env: BROWSERSTACK_APP: ./WikipediaSample.apk + BROWSERSTACK_TEST_ROOT: ${{ github.workspace }}/android + VSTest_Debug: 1 - name: Run local android tests shell: pwsh diff --git a/android/android.csproj b/android/android.csproj index 4aac919..c911b67 100644 --- a/android/android.csproj +++ b/android/android.csproj @@ -7,6 +7,7 @@ enable false + 6.0.0 From 1bc0e678068ea1a5483600a58ca849d6ecfefa52 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Wed, 25 Dec 2024 15:18:16 +0530 Subject: [PATCH 16/28] added fix --- .github/workflows/sanity-workflow.yml | 28 +++++---------------------- android/android.csproj | 7 +++++++ 2 files changed, 12 insertions(+), 23 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 3bd1c10..3de6b03 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -21,6 +21,7 @@ jobs: env: BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} + BROWSERSTACK_TEST_ROOT: ${{ github.workspace }}/android steps: - uses: actions/checkout@v3 @@ -51,7 +52,6 @@ jobs: uses: actions/setup-dotnet@v3 with: dotnet-version: '6.0.x' - include-prerelease: false - name: Setup BrowserStack run: | @@ -59,31 +59,13 @@ jobs: dotnet tool install BrowserStack.TestAdapter.Dotnet.Tool dotnet tool restore - - name: Install .NET workloads - run: | - dotnet workload install android - dotnet workload install ios - - - name: Clear NuGet cache and restore - run: | - dotnet nuget locals all --clear - cd android - dotnet restore --verbosity detailed - - - name: Build project - run: | - cd android - dotnet build --configuration Release - - - name: Run tests with detailed logging + - name: Build and Test shell: pwsh run: | cd android - dotnet test --no-build --configuration Release --verbosity detailed --logger "console;verbosity=detailed" --filter "Category=sample-test" - env: - BROWSERSTACK_APP: ./WikipediaSample.apk - BROWSERSTACK_TEST_ROOT: ${{ github.workspace }}/android - VSTest_Debug: 1 + dotnet restore + dotnet build --configuration Release + dotnet test --no-build --configuration Release --verbosity detailed --logger "console;verbosity=detailed" --filter "Category=sample-test" --blame-crash - name: Run local android tests shell: pwsh diff --git a/android/android.csproj b/android/android.csproj index c911b67..a405e5d 100644 --- a/android/android.csproj +++ b/android/android.csproj @@ -16,7 +16,14 @@ + + + + PreserveNewest + + + From 43ea61cab7260e8314ade7079435e6656209db01 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Wed, 25 Dec 2024 15:22:20 +0530 Subject: [PATCH 17/28] added fix --- .github/workflows/sanity-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 3de6b03..2acd735 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -65,7 +65,7 @@ jobs: cd android dotnet restore dotnet build --configuration Release - dotnet test --no-build --configuration Release --verbosity detailed --logger "console;verbosity=detailed" --filter "Category=sample-test" --blame-crash + dotnet test --diag:log.txt --no-build --configuration Release --verbosity detailed - name: Run local android tests shell: pwsh From ae15b8f6b3aaab527e730f81e5fe054af8c19142 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Wed, 25 Dec 2024 15:34:01 +0530 Subject: [PATCH 18/28] added fix --- .github/workflows/sanity-workflow.yml | 28 ++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 2acd735..39544f8 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false max-parallel: 1 matrix: - dotnet: ['6.0.x'] + dotnet: ['6.0.408'] name: NUnit Appium Repo ${{ matrix.dotnet }} Sample env: BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} @@ -27,6 +27,25 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.commit_sha }} + + - name: Remove existing .NET SDKs + run: | + Remove-Item -Path "C:\Program Files\dotnet\sdk\9.*" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "C:\Program Files\dotnet\sdk\8.*" -Recurse -Force -ErrorAction SilentlyContinue + + - name: Setup .NET 6.0 + uses: actions/setup-dotnet@v3 + with: + dotnet-version: '6.0.408' + include-prerelease: false + + - name: Verify .NET version + run: | + dotnet --version + dotnet --list-sdks + + - name: Clear NuGet cache + run: dotnet nuget locals all --clear - uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 id: status-check-in-progress @@ -48,14 +67,9 @@ jobs: console.log('Failed to create check run') } - - name: Setup dotnet - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '6.0.x' - - name: Setup BrowserStack run: | - dotnet new tool-manifest + dotnet new tool-manifest --force dotnet tool install BrowserStack.TestAdapter.Dotnet.Tool dotnet tool restore From c8207592649630c472f797bd6341aab0e38f5b98 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Wed, 25 Dec 2024 15:45:00 +0530 Subject: [PATCH 19/28] added fix --- .github/workflows/sanity-workflow.yml | 33 +++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 39544f8..23d46ab 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -32,6 +32,13 @@ jobs: run: | Remove-Item -Path "C:\Program Files\dotnet\sdk\9.*" -Recurse -Force -ErrorAction SilentlyContinue Remove-Item -Path "C:\Program Files\dotnet\sdk\8.*" -Recurse -Force -ErrorAction SilentlyContinue + Remove-Item -Path "C:\Program Files\dotnet\sdk\7.*" -Recurse -Force -ErrorAction SilentlyContinue + + - name: Clean existing .NET installations + shell: pwsh + run: | + Get-ChildItem -Path "C:\Program Files\dotnet\sdk-manifests" -Recurse -ErrorAction SilentlyContinue | Remove-Item -Force -Recurse + Get-ChildItem -Path "C:\Program Files\dotnet\sdk" -Directory | Where-Object { $_.Name -notmatch '^6\.0\.' } | Remove-Item -Force -Recurse - name: Setup .NET 6.0 uses: actions/setup-dotnet@v3 @@ -39,13 +46,27 @@ jobs: dotnet-version: '6.0.408' include-prerelease: false + - name: Install .NET workloads + shell: pwsh + run: | + dotnet workload install android ios maui --skip-manifest-update + dotnet workload repair + + - name: Verify .NET setup + run: | + dotnet --info + dotnet workload list + - name: Verify .NET version run: | dotnet --version dotnet --list-sdks - name: Clear NuGet cache - run: dotnet nuget locals all --clear + run: | + dotnet nuget locals all --clear + cd android + dotnet restore --verbosity detailed - uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 id: status-check-in-progress @@ -73,13 +94,17 @@ jobs: dotnet tool install BrowserStack.TestAdapter.Dotnet.Tool dotnet tool restore - - name: Build and Test + - name: Run tests shell: pwsh run: | cd android - dotnet restore + $env:MSBUILDSINGLELOADCONTEXT = 1 dotnet build --configuration Release - dotnet test --diag:log.txt --no-build --configuration Release --verbosity detailed + dotnet test --no-build --configuration Release --verbosity detailed ` + --logger "console;verbosity=detailed" ` + --filter "Category=sample-test" ` + --blame-crash-dump-type full ` + --diag:test_log.txt - name: Run local android tests shell: pwsh From 079465f4faeabf1ced5ad56571bb65cd10e7ea18 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Thu, 26 Dec 2024 15:45:19 +0530 Subject: [PATCH 20/28] added fix --- .github/workflows/sanity-workflow.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 23d46ab..eb3badc 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -100,11 +100,9 @@ jobs: cd android $env:MSBUILDSINGLELOADCONTEXT = 1 dotnet build --configuration Release - dotnet test --no-build --configuration Release --verbosity detailed ` + dotnet test --verbosity detailed ` --logger "console;verbosity=detailed" ` --filter "Category=sample-test" ` - --blame-crash-dump-type full ` - --diag:test_log.txt - name: Run local android tests shell: pwsh From fdd6360bf0c3cd92db74701d58635445c30c78a5 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Fri, 27 Dec 2024 16:32:35 +0530 Subject: [PATCH 21/28] added fix --- .github/workflows/sanity-workflow.yml | 83 ++++++--------------------- android/android.csproj | 10 +--- 2 files changed, 19 insertions(+), 74 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index eb3badc..78ec767 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -1,5 +1,6 @@ # This job is to test different profiles in sdk branch against full commit id # This workflow targets nunit + name: C-sharp SDK Test workflow on workflow_dispatch on: @@ -11,63 +12,22 @@ on: jobs: comment-run: - runs-on: windows-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: false - max-parallel: 1 + max-parallel: 3 matrix: - dotnet: ['6.0.408'] - name: NUnit Appium Repo ${{ matrix.dotnet }} Sample + dotnet: ['7.0.x', '6.0.x', '5.0.x'] + os: [ windows-latest ] + name: NUnit Appium Repo ${{ matrix.dotnet }} - ${{ matrix.os }} Sample env: BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }} BROWSERSTACK_ACCESS_KEY: ${{ secrets.BROWSERSTACK_ACCESS_KEY }} - BROWSERSTACK_TEST_ROOT: ${{ github.workspace }}/android steps: - uses: actions/checkout@v3 with: ref: ${{ github.event.inputs.commit_sha }} - - - name: Remove existing .NET SDKs - run: | - Remove-Item -Path "C:\Program Files\dotnet\sdk\9.*" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "C:\Program Files\dotnet\sdk\8.*" -Recurse -Force -ErrorAction SilentlyContinue - Remove-Item -Path "C:\Program Files\dotnet\sdk\7.*" -Recurse -Force -ErrorAction SilentlyContinue - - - name: Clean existing .NET installations - shell: pwsh - run: | - Get-ChildItem -Path "C:\Program Files\dotnet\sdk-manifests" -Recurse -ErrorAction SilentlyContinue | Remove-Item -Force -Recurse - Get-ChildItem -Path "C:\Program Files\dotnet\sdk" -Directory | Where-Object { $_.Name -notmatch '^6\.0\.' } | Remove-Item -Force -Recurse - - - name: Setup .NET 6.0 - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '6.0.408' - include-prerelease: false - - - name: Install .NET workloads - shell: pwsh - run: | - dotnet workload install android ios maui --skip-manifest-update - dotnet workload repair - - - name: Verify .NET setup - run: | - dotnet --info - dotnet workload list - - - name: Verify .NET version - run: | - dotnet --version - dotnet --list-sdks - - - name: Clear NuGet cache - run: | - dotnet nuget locals all --clear - cd android - dotnet restore --verbosity detailed - - uses: actions/github-script@98814c53be79b1d30f795b907e553d8679345975 id: status-check-in-progress env: @@ -87,43 +47,36 @@ jobs: if (result.status !== 201) { console.log('Failed to create check run') } + - name: Setup dotnet + uses: actions/setup-dotnet@v3 + with: + dotnet-version: ${{ matrix.dotnet }} - - name: Setup BrowserStack + - name: Install dependencies run: | - dotnet new tool-manifest --force - dotnet tool install BrowserStack.TestAdapter.Dotnet.Tool - dotnet tool restore - - - name: Run tests - shell: pwsh + dotnet new globaljson --sdk-version ${{ steps.dotnetsetup.outputs.dotnet-version }} + dotnet --version + dotnet build + + - name: Run sample android tests run: | cd android - $env:MSBUILDSINGLELOADCONTEXT = 1 - dotnet build --configuration Release - dotnet test --verbosity detailed ` - --logger "console;verbosity=detailed" ` - --filter "Category=sample-test" ` + dotnet test --filter "Category=sample-test" - name: Run local android tests - shell: pwsh run: | - Start-Sleep -Seconds 5 # Prevent file access conflicts cd android dotnet test --filter "Category=sample-local-test" env: BROWSERSTACK_APP: ./LocalSample.apk - name: Run sample ios tests - shell: pwsh run: | - Start-Sleep -Seconds 5 # Prevent file access conflicts cd ios dotnet test --filter "Category=sample-test" - name: Run local ios tests - shell: pwsh run: | - Start-Sleep -Seconds 5 # Prevent file access conflicts cd ios dotnet test --filter "Category=sample-local-test" env: @@ -150,4 +103,4 @@ jobs: console.log(`The status-check response : ${result.status} Response : ${JSON.stringify(result.response)}`) if (result.status !== 201) { console.log('Failed to create check run') - } + } \ No newline at end of file diff --git a/android/android.csproj b/android/android.csproj index a405e5d..196eafd 100644 --- a/android/android.csproj +++ b/android/android.csproj @@ -7,7 +7,6 @@ enable false - 6.0.0 @@ -16,14 +15,7 @@ - - - - PreserveNewest - - - - + \ No newline at end of file From ff0f7ec4be86b3f65551288588b6b347012d8c6e Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Fri, 27 Dec 2024 16:38:21 +0530 Subject: [PATCH 22/28] added fix --- .github/workflows/sanity-workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 78ec767..75f7d6c 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false max-parallel: 3 matrix: - dotnet: ['7.0.x', '6.0.x', '5.0.x'] + dotnet: ['6.0.x'] os: [ windows-latest ] name: NUnit Appium Repo ${{ matrix.dotnet }} - ${{ matrix.os }} Sample env: From fab227722d230039ef4ab40ed337fc107d0b4b7b Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Fri, 27 Dec 2024 16:43:36 +0530 Subject: [PATCH 23/28] added fix --- .github/workflows/sanity-workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 75f7d6c..9a52843 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -54,6 +54,7 @@ jobs: - name: Install dependencies run: | + cd android dotnet new globaljson --sdk-version ${{ steps.dotnetsetup.outputs.dotnet-version }} dotnet --version dotnet build From 8878453144d8fa92c333167aab0dd2071adab102 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Fri, 27 Dec 2024 17:00:23 +0530 Subject: [PATCH 24/28] added fix --- .github/workflows/sanity-workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 9a52843..ba5fe35 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -49,14 +49,16 @@ jobs: } - name: Setup dotnet uses: actions/setup-dotnet@v3 + id: dotnetsetup with: dotnet-version: ${{ matrix.dotnet }} - name: Install dependencies run: | - cd android dotnet new globaljson --sdk-version ${{ steps.dotnetsetup.outputs.dotnet-version }} dotnet --version + cd android + dotnet --version dotnet build - name: Run sample android tests From 1fce16622e16df3c940cc601bb92e3cd52966bdd Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Fri, 27 Dec 2024 17:07:34 +0530 Subject: [PATCH 25/28] added fix --- android/browserstack.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/browserstack.yml b/android/browserstack.yml index 61e6fc7..a65e8a8 100644 --- a/android/browserstack.yml +++ b/android/browserstack.yml @@ -25,7 +25,7 @@ source: 'nunit:appium-sample-sdk:v1.0' # Set `app` to define the app that is to be used for testing. # It can either take the id of any uploaded app or the path of the app directly. -app: ./WikipediaSample.apk +app: ./sampleapk.apk # app: ./LocalSample.apk #For running local tests # ======================================= From 9f01d22d5c6d6a084fde0021e4c2249f79807ab7 Mon Sep 17 00:00:00 2001 From: rahulpsq Date: Fri, 27 Dec 2024 17:13:12 +0530 Subject: [PATCH 26/28] changed dotnet version --- .github/workflows/sanity-workflow.yml | 2 +- android/android.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index ba5fe35..10a57ea 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false max-parallel: 3 matrix: - dotnet: ['6.0.x'] + dotnet: ['7.0.x'] os: [ windows-latest ] name: NUnit Appium Repo ${{ matrix.dotnet }} - ${{ matrix.os }} Sample env: diff --git a/android/android.csproj b/android/android.csproj index 196eafd..0b36b6a 100644 --- a/android/android.csproj +++ b/android/android.csproj @@ -1,7 +1,7 @@ - net6.0 + net7.0 BrowserStack enable enable From 5bf3557809b8592a359c6e977239307098f47ad1 Mon Sep 17 00:00:00 2001 From: rahulpsq <81632139+rahulpsq@users.noreply.github.com> Date: Wed, 15 Jan 2025 16:26:52 +0530 Subject: [PATCH 27/28] Update sanity-workflow.yml --- .github/workflows/sanity-workflow.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/sanity-workflow.yml b/.github/workflows/sanity-workflow.yml index 10a57ea..3d34e0d 100644 --- a/.github/workflows/sanity-workflow.yml +++ b/.github/workflows/sanity-workflow.yml @@ -65,6 +65,8 @@ jobs: run: | cd android dotnet test --filter "Category=sample-test" + env: + BROWSERSTACK_APP: ./WikipediaSample.apk - name: Run local android tests run: | @@ -106,4 +108,4 @@ jobs: console.log(`The status-check response : ${result.status} Response : ${JSON.stringify(result.response)}`) if (result.status !== 201) { console.log('Failed to create check run') - } \ No newline at end of file + } From 0c028ec2debb2eebe53d024442e16a179a3d4ee8 Mon Sep 17 00:00:00 2001 From: rahulpsq <81632139+rahulpsq@users.noreply.github.com> Date: Mon, 24 Feb 2025 20:06:39 +0530 Subject: [PATCH 28/28] Update browserstack.yml --- ios/browserstack.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ios/browserstack.yml b/ios/browserstack.yml index 66a53a6..f5a73d9 100644 --- a/ios/browserstack.yml +++ b/ios/browserstack.yml @@ -41,8 +41,8 @@ platforms: - deviceName: iPhone 13 Pro osVersion: 15 platformName: ios - - deviceName: iPhone XS - osVersion: 14 + - deviceName: iPhone 12 + osVersion: 17 platformName: ios # ==========================================