Skip to content

Maintenance update (2025-02) (#2) #12

Maintenance update (2025-02) (#2)

Maintenance update (2025-02) (#2) #12

name: .NET Core Desktop
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
strategy:
matrix:
configuration: [Debug, Release]
runs-on: windows-latest
env:
Solution_Path: src\framework\kaspirin.sln
Configuration: ${{ matrix.configuration }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
# Build all projects in the solution
- name: Build solution
run: dotnet build $env:Solution_Path -c $env:Configuration
# Execute all unit tests in the solution
- name: Execute unit tests
run: dotnet test $env:Solution_Path -c $env:Configuration --logger trx --results-directory "TestResults-trx"
- name: Upload dotnet test results
uses: actions/upload-artifact@v4
with:
name: dotnet-results-trx-${{ env.Configuration }}
path: TestResults-trx
if: ${{ always() }}
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Path /t:Restore /p:Configuration=$env:Configuration