Skip to content

Commit

Permalink
Merge branch 'master' into net8
Browse files Browse the repository at this point in the history
  • Loading branch information
cwinland committed Jul 15, 2024
2 parents db265dc + 40ca3a1 commit e9829be
Showing 1 changed file with 26 additions and 41 deletions.
67 changes: 26 additions & 41 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,34 @@
# For more information on GitHub Actions, refer to https://github.com/features/actions
# For a complete CI/CD sample to get started with GitHub Action workflows for Desktop Applications,
# refer to https://github.com/microsoft/github-actions-for-desktop-apps
name: Build and Test .NET Projects

name: .NET Core Desktop

on: [push, pull_request]
on:
push:
branches:
- master # Adjust the branch name as needed

jobs:

build:

build-and-test:
strategy:
matrix:
configuration: [Release]
dotnet-version: ['6.x', '7.x', '8.x'] # Specify the desired versions

runs-on: windows-latest # For a list of available runner types, refer to
# https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on

env:
Solution_Name: wpf-material-dialogs.sln
Test_Project_Path: wpf-material-dialogs.test\wpf-material-dialogs.test.csproj
runs-on: ubuntu-latest

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

# Install the .NET Core workload
- name: Install .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/[email protected]

# Execute all unit tests in the solution
- name: Execute unit tests
run: dotnet test

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: ${{ matrix.configuration }}

- name: Checkout
uses: actions/checkout@v2

# Set up .NET Core for each version
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ matrix.dotnet-version }}

# Restore and build the application
- name: Restore and Build
run: |
dotnet restore
dotnet build
# Run tests using the existing restore
- name: Run Tests
run: dotnet test

0 comments on commit e9829be

Please sign in to comment.