-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (50 loc) · 1.59 KB
/
validate.yml
File metadata and controls
53 lines (50 loc) · 1.59 KB
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
50
51
52
53
name: Validate PRs and Main branch
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_call:
secrets:
WINSTRUMENTA_E2E_SSH_PRIVATE_KEY:
required: true
jobs:
check_formatting:
runs-on: ubuntu-latest
name: Check Formatting
steps:
- uses: actions/checkout@v2
- run: |
dotnet tool restore
dotnet csharpier --check
execute_tests:
runs-on: windows-2022
name: Execute tests
strategy:
matrix:
platform: ["x86", "x64", "arm64"]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
ssh-key: ${{ secrets.WINSTRUMENTA_E2E_SSH_PRIVATE_KEY }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Add msbuild to PATH
uses: microsoft/[email protected]
with:
msbuild-architecture: x64
vs-version: 17
vs-prerelease: true
- name: Setup VSTest Path
uses: darenm/Setup-VSTest@v1
- name: Build
run: msbuild /m /t:build /restore /p:Configuration=Release /p:Platform=${{ matrix.platform }} /p:AppxPackage=false /m Winstrumenta.sln
- name: Test
if: ${{ matrix.platform != 'arm64' }} # skip arm64 tests since github runners are only x86 and x64 but not arm64
run: Get-ChildItem -Recurse -Filter "*.Tests.dll" | ? { $_.FullName -Match "bin.[^.]+.Release" -and $_.FullName -notmatch "ref" -and $_.FullName -notmatch "Winstrumenta.Package.Tests" } | % { vstest.console.exe $_.FullName }