From a93dbb519a0d8d5aebc72d2f735f3a2a53b7537e Mon Sep 17 00:00:00 2001 From: Amruth VVKP Date: Sat, 6 Jul 2024 16:52:31 +0100 Subject: [PATCH] Updated Appveyor build to use Dotnet 7 instead of 8 and upload JUnit test results of Pytest instead of FlaUI nunit tests Fixes #71 --- .appveyor.yml | 33 +++++++++++++++++++++++---------- 1 file changed, 23 insertions(+), 10 deletions(-) diff --git a/.appveyor.yml b/.appveyor.yml index 3248b46..dd810df 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -70,15 +70,26 @@ init: install: - cmd: >- set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH% - python --version before_build: - cmd: git clone https://github.com/FlaUI/FlaUI.git C:\projects\FlaUI + # Create global.json to specify .NET SDK version + - ps: | + $globalJson = @{ + sdk = @{ + version = "6.0.202" # Specify the desired .NET SDK version + } + } | ConvertTo-Json -Compress + Set-Content -Path "C:\projects\FlaUI\global.json" -Value $globalJson + build_script: - ps: | - # Run PowerShell script + dotnet --version + + # Run PowerShell script + - ps: | & "C:\\projects\\FlaUI\\build.ps1" after_build: @@ -108,18 +119,20 @@ artifacts: - path: test_applications name: test-applications +cache: + - C:\Users\appveyor\.nuget\packages # Cache the NuGet packages + - C:\projects\FlaUI\**\bin + - C:\projects\FlaUI\**\obj + - C:\projects\FlaUI\src\TestApplications + on_finish: - ps: >- $wc = New-Object 'System.Net.WebClient' - if (Test-Path .test-results.xml) { - $wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .test-results.xml)) - } - - if (Test-Path .coverage.xml) { - $wc.UploadFile("https://ci.appveyor.com/api/testresults/coverage/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .coverage.xml)) + if (Test-Path .\test-results.xml) { + $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\test-results.xml)) } - if (Test-Path "C:/projects/FlaUI/artifacts/UnitTestResult.xml") { - $wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", "C:/projects/FlaUI/artifacts/UnitTestResult.xml") + if (Test-Path .\coverage.xml) { + $wc.UploadFile("https://ci.appveyor.com/api/testresults/coverage/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\coverage.xml)) }