Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: CI

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
x64_build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up MSBuild
uses: microsoft/setup-msbuild@v2

- name: Build solution
run: msbuild LogMonitor\LogMonitor.sln /p:Configuration=Release /p:Platform=x64

- name: Install VsTest
run: |
nuget.exe install Microsoft.TestPlatform -Version 17.11.0 -Source https://api.nuget.org/v3/index.json -OutputDirectory D:\a\_temp\VsTest -NoCache -DirectDownload -NonInteractive
echo "D:\a\_temp\VsTest\Microsoft.TestPlatform.17.11.0\tools\net462\Common7\IDE\Extensions\TestPlatform\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Run tests
run: vstest.console.exe **\*test*.dll /Platform:x64

- name: Publish artifact
uses: actions/upload-artifact@v3
with:
name: 64-bit
path: LogMonitor\x64\Release

x86_build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up MSBuild
uses: microsoft/setup-msbuild@v2

- name: Build solution
run: msbuild LogMonitor\LogMonitor.sln /p:Configuration=Release /p:Platform=x86

- name: Install VsTest
run: |
nuget.exe install Microsoft.TestPlatform -Version 17.11.0 -Source https://api.nuget.org/v3/index.json -OutputDirectory D:\a\_temp\VsTest -NoCache -DirectDownload -NonInteractive
echo "D:\a\_temp\VsTest\Microsoft.TestPlatform.17.11.0\tools\net462\Common7\IDE\Extensions\TestPlatform\" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Run tests
run: vstest.console.exe **\*test*.dll /Platform:x86

- name: Publish artifact
uses: actions/upload-artifact@v3
with:
name: 32-bit
path: LogMonitor\Release