This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
76 lines (56 loc) · 2.02 KB
/
build-test.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: BuildAndTest.CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
repository_dispatch:
env:
solution: './Source/Microsoft.Gateway/Microsoft.Gateway.sln'
buildPlatform: x64
buildConfiguration: Release
jobs:
build-test:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
with:
lfs: true
- name: Setup Nuget
uses: nuget/setup-nuget@v1
with:
nuget-version: 'latest'
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1.0.2
- name: Nuget Restore
run: nuget restore ${{ env.solution }}
- name: Download Dependencies
shell: Powershell
run: |
cd .\Source\Microsoft.Gateway
.\download_dcmtk.ps1
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: 'csharp'
- name: Build Solution
run: msbuild.exe /nologo /t:build /p:UseSharedCompilation=false /p:Configuration=${{ env.buildConfiguration }} /p:Platform=${{ env.buildPlatform }} ${{ env.solution }}
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
- name: Setup VSTest Path
uses: darenm/Setup-VSTest@v1
- name: Test Solution
shell: Powershell
run: |
$erroractionpreference = "stop"
$TestFiles = $(Get-ChildItem $PATH -include *tests*.dll -exclude "*TestAdapter*","*TestPlatform*","*MSTest*","*Integration.Tests*" -recurse | where {$_.FullName -notlike "*obj*"}).fullname
$TestArgs = $TestFiles + "/Platform:x64"
vstest.console.exe $TestArgs
- name: Test Integration
shell: Powershell
run: |
$erroractionpreference = "stop"
$TestFiles = $(Get-ChildItem $PATH -include *Integration.Tests*.dll -exclude "*TestAdapter*","*TestPlatform*","*MSTest*" -recurse | where {$_.FullName -notlike "*obj*"}).fullname
setx INNEREYE_INFERENCE_DEV_KEY ${{ secrets.INNEREYE_INFERENCE_DEV_KEY }} /M
vstest.console.exe $TestFiles /Platform:x64
exit $lastexitcode