-
Notifications
You must be signed in to change notification settings - Fork 5
49 lines (46 loc) · 1.69 KB
/
test-xharness-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: XHarness Windows Test
on:
pull_request:
push:
branches: [ main, 'releases/**' ]
release:
types: [ published ]
jobs:
windows:
name: Windows
runs-on: windows-latest
env:
TEST_TARGET_FRAMEWORK: net8.0-windows10.0.19041.0
TEST_RUNTIME_IDENTIFIER: win10-x64
TEST_CONFIGURATION: Release
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Required Tools
uses: ./.github/workflows/setup-tools
- name: Publish App
run: |
$fingerprint = ./scripts/New-Certificate.ps1 -Project sample/test/DeviceTestingKitApp.DeviceTests/DeviceTestingKitApp.DeviceTests.csproj
dotnet publish sample/test/DeviceTestingKitApp.DeviceTests/DeviceTestingKitApp.DeviceTests.csproj `
-f ${{ env.TEST_TARGET_FRAMEWORK }} `
-c ${{ env.TEST_CONFIGURATION }} `
-p:TestingMode=XHarness `
-p:AppxPackageSigningEnabled=true `
-p:PackageCertificateThumbprint=$fingerprint `
-p:PackageCertificateKeyFile="" `
/bl:./artifacts/logs/msbuild-publish.binlog
./scripts/Remove-Certificate.ps1 -CertificateFingerprint $fingerprint
- name: Run Tests
run: |
$msix = Get-ChildItem "sample/test/DeviceTestingKitApp.DeviceTests/bin/${{ env.TEST_CONFIGURATION }}/${{ env.TEST_TARGET_FRAMEWORK }}/${{ env.TEST_RUNTIME_IDENTIFIER }}/AppPackages/*_Test/*.msix"
./scripts/Start-Tests.ps1 `
-App $msix `
-OutputDirectory artifacts `
-TestingMode XHarness
shell: powershell
- name: Upload Artifacts
uses: actions/upload-artifact@v4
if: ${{ always() }}
with:
name: Test Results
path: ./artifacts