From 110c2349fc73a931fea7cafbce5925f494b3042f Mon Sep 17 00:00:00 2001 From: Sora <45709238+sorabug@users.noreply.github.com> Date: Sun, 16 Apr 2023 08:03:55 +0800 Subject: [PATCH] test --- .github/workflows/dotnet-desktop.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml index e57dfe6..a85797a 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-desktop.yml @@ -1,4 +1,4 @@ -name: .NET 4.0 Build +name: Build and Test on: push: @@ -16,7 +16,7 @@ jobs: - name: Checkout code uses: actions/checkout@v2 - - name: Setup .NET Framework + - name: Use .NET Framework version 4.0 uses: microsoft/setup-msbuild@v1.0.2 with: dotnet-version: '4.0' @@ -26,3 +26,14 @@ jobs: - name: Build solution run: msbuild.exe YourSolution.sln /t:Build /p:Configuration=Release + + - name: Run tests + run: vstest.console.exe YourTestProject.dll /Logger:trx + + - name: Archive artifacts + uses: actions/upload-artifact@v2 + with: + name: Artifacts + path: | + YourSolution/bin/Release/* + YourTestProject/TestResults/*.trx