Skip to content

Commit

Permalink
Use dotnet in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dfederm committed Aug 7, 2024
1 parent 1ec68a5 commit 55298c2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 8 deletions.
30 changes: 22 additions & 8 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,32 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

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

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

- name: Build
run: msbuild
run: dotnet build --configuration Debug --no-restore -bl:logs/build.binlog

- name: Test
run: vstest.console **\*.UnitTests.dll
run: dotnet test --configuration Debug --no-build --logger trx --results-directory TestResults

- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: ./TestResults
if: ${{ always() }} # Always run this step even on failure

- name: Upload logs
uses: actions/upload-artifact@v4
with:
name: logs
path: ./logs
if: ${{ always() }} # Always run this step even on failure
1 change: 1 addition & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
<MSBuildTreatWarningsAsErrors>true</MSBuildTreatWarningsAsErrors>
<NoWarn>$(NoWarn);SA0001</NoWarn>
<RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
<UseArtifactsOutput>true</UseArtifactsOutput>
</PropertyGroup>
</Project>

0 comments on commit 55298c2

Please sign in to comment.