Skip to content

Commit

Permalink
Updated Appveyor build to use Dotnet 7 instead of 8 and upload JUnit …
Browse files Browse the repository at this point in the history
…test results of Pytest instead of FlaUI nunit tests

Fixes #71
  • Loading branch information
amruthvvkp committed Jul 6, 2024
1 parent c34ca54 commit a93dbb5
Showing 1 changed file with 23 additions and 10 deletions.
33 changes: 23 additions & 10 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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))
}

0 comments on commit a93dbb5

Please sign in to comment.