Skip to content

Commit cf71e8b

Browse files
authored
Use dotnet in CI (#46)
1 parent 1ec68a5 commit cf71e8b

File tree

2 files changed

+23
-8
lines changed

2 files changed

+23
-8
lines changed

.github/workflows/dotnet-desktop.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,32 @@ jobs:
1414

1515
steps:
1616
- name: Checkout
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v4
1818
with:
1919
fetch-depth: 0
2020

21-
- name: Setup MSBuild
22-
uses: microsoft/setup-msbuild@v1.0.2
21+
- name: Setup .NET
22+
uses: actions/setup-dotnet@v4
2323

24-
- name: Setup VSTest
25-
uses: darenm/Setup-VSTest@v1
24+
- name: Restore
25+
run: dotnet restore -bl:logs/restore.binlog
2626

2727
- name: Build
28-
run: msbuild
29-
28+
run: dotnet build --configuration Debug --no-restore -bl:logs/build.binlog
29+
3030
- name: Test
31-
run: vstest.console **\*.UnitTests.dll
31+
run: dotnet test --configuration Debug --no-build --logger trx --results-directory TestResults
32+
33+
- name: Upload test results
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: test-results
37+
path: ./TestResults
38+
if: ${{ always() }} # Always run this step even on failure
39+
40+
- name: Upload logs
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: logs
44+
path: ./logs
45+
if: ${{ always() }} # Always run this step even on failure

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
88
<NoWarn>$(NoWarn);SA0001</NoWarn>
99
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
10+
<UseArtifactsOutput>true</UseArtifactsOutput>
1011
</PropertyGroup>
1112
</Project>

0 commit comments

Comments
 (0)