зеркало из https://github.com/AvaloniaUI/Avalonia.git
96 строки
2.4 KiB
YAML
96 строки
2.4 KiB
YAML
jobs:
|
|
- job: Mac
|
|
pool:
|
|
name: 'AvaloniaMacPool'
|
|
|
|
steps:
|
|
- task: UseDotNet@2
|
|
displayName: 'Use .NET 6.0 Runtime'
|
|
inputs:
|
|
packageType: runtime
|
|
version: 6.0.x
|
|
|
|
- task: UseDotNet@2
|
|
displayName: 'Use .NET 8.0 SDK'
|
|
inputs:
|
|
packageType: sdk
|
|
useGlobalJson: true
|
|
|
|
- script: system_profiler SPDisplaysDataType |grep Resolution
|
|
displayName: 'Get Resolution'
|
|
|
|
- script: |
|
|
arch="x64"
|
|
if [[ $(uname -m) == 'arm64' ]]; then
|
|
arch="arm64"
|
|
fi
|
|
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
|
|
pkill node
|
|
pkill testmanagerd
|
|
appium > appium.out &
|
|
pkill IntegrationTestApp
|
|
./build.sh CompileNative
|
|
rm -rf $(osascript -e "POSIX path of (path to application id \"net.avaloniaui.avalonia.integrationtestapp\")")
|
|
pkill IntegrationTestApp
|
|
./samples/IntegrationTestApp/bundle.sh
|
|
open -n ./samples/IntegrationTestApp/bin/Debug/net8.0/osx-$arch/publish/IntegrationTestApp.app
|
|
pkill IntegrationTestApp
|
|
displayName: 'Build IntegrationTestApp'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'Run Integration Tests'
|
|
inputs:
|
|
command: 'test'
|
|
projects: 'tests/Avalonia.IntegrationTests.Appium/Avalonia.IntegrationTests.Appium.csproj'
|
|
arguments: '-l "console;verbosity=detailed"'
|
|
|
|
- script: |
|
|
pkill IntegrationTestApp
|
|
pkill node
|
|
displayName: 'Stop Appium'
|
|
|
|
- publish: appium.out
|
|
displayName: 'Publish appium logs on failure'
|
|
condition: failed()
|
|
|
|
- job: Windows
|
|
pool:
|
|
vmImage: 'windows-2022'
|
|
|
|
steps:
|
|
- task: UseDotNet@2
|
|
displayName: 'Use .NET 6.0 Runtime'
|
|
inputs:
|
|
packageType: runtime
|
|
version: 6.0.x
|
|
|
|
- task: UseDotNet@2
|
|
displayName: 'Use .NET 8.0 SDK'
|
|
inputs:
|
|
packageType: sdk
|
|
useGlobalJson: true
|
|
|
|
- task: Windows Application Driver@0
|
|
inputs:
|
|
OperationType: 'Start'
|
|
AgentResolution: '4K'
|
|
displayName: 'Start WinAppDriver'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'Build IntegrationTestApp'
|
|
inputs:
|
|
command: 'build'
|
|
projects: 'samples/IntegrationTestApp/IntegrationTestApp.csproj'
|
|
|
|
- task: DotNetCoreCLI@2
|
|
displayName: 'Run Integration Tests'
|
|
retryCountOnTaskFailure: 3
|
|
inputs:
|
|
command: 'test'
|
|
projects: 'tests/Avalonia.IntegrationTests.Appium/Avalonia.IntegrationTests.Appium.csproj'
|
|
|
|
- task: Windows Application Driver@0
|
|
inputs:
|
|
OperationType: 'Stop'
|
|
displayName: 'Stop WinAppDriver'
|