From 7b2bce6ae7b657a121fca6c276f17b565b36f603 Mon Sep 17 00:00:00 2001 From: Christopher Winland Date: Mon, 15 Jul 2024 10:58:53 -0400 Subject: [PATCH 1/5] Update dotnet-desktop.yml --- .github/workflows/dotnet-desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml index 1bc7c35..ee3fc13 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-desktop.yml @@ -31,7 +31,7 @@ jobs: - name: Install .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 7.0.x + dotnet-version: 8.0.x # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe From fb4509e89ab5c553b47fc2a60471e3cc6b0de9c6 Mon Sep 17 00:00:00 2001 From: Christopher Winland Date: Mon, 15 Jul 2024 11:05:42 -0400 Subject: [PATCH 2/5] Update dotnet-desktop.yml --- .github/workflows/dotnet-desktop.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml index ee3fc13..76ea917 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-desktop.yml @@ -13,7 +13,8 @@ jobs: 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 @@ -27,11 +28,11 @@ jobs: with: fetch-depth: 0 - # Install the .NET Core workload - - name: Install .NET Core + # Specify the correct .NET version + - name: Setup .NET Core uses: actions/setup-dotnet@v1 with: - dotnet-version: 8.0.x + dotnet-version: ${{ matrix.dotnet-version }} # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - name: Setup MSBuild.exe From 305598bd49381e930f5212dc10230a8e2e61e324 Mon Sep 17 00:00:00 2001 From: Christopher Winland Date: Mon, 15 Jul 2024 11:08:20 -0400 Subject: [PATCH 3/5] Update dotnet-desktop.yml --- .github/workflows/dotnet-desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml index 76ea917..eb705e3 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-desktop.yml @@ -40,7 +40,7 @@ jobs: # Execute all unit tests in the solution - name: Execute unit tests - run: dotnet test + run: dotnet test --framework ${{ matrix.dotnet-version }} # Restore the application to populate the obj folder with RuntimeIdentifiers - name: Restore the application From f24a9ab2b25cbffe8d6fa73c1cc8e746061a6d5d Mon Sep 17 00:00:00 2001 From: Christopher Winland Date: Mon, 15 Jul 2024 11:15:42 -0400 Subject: [PATCH 4/5] Update dotnet-desktop.yml --- .github/workflows/dotnet-desktop.yml | 66 +++++++++++----------------- 1 file changed, 25 insertions(+), 41 deletions(-) diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml index eb705e3..a50cf44 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-desktop.yml @@ -1,50 +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: + - main # 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 - - # Specify the correct .NET version - - name: Setup .NET Core - uses: actions/setup-dotnet@v1 - with: - dotnet-version: ${{ matrix.dotnet-version }} - - # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild - - name: Setup MSBuild.exe - uses: microsoft/setup-msbuild@v1.0.2 - - # Execute all unit tests in the solution - - name: Execute unit tests - run: dotnet test --framework ${{ matrix.dotnet-version }} - - # 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 From 40ca3a1651e937770b61020b3ea2c9a78ed1df96 Mon Sep 17 00:00:00 2001 From: Christopher Winland Date: Mon, 15 Jul 2024 11:16:05 -0400 Subject: [PATCH 5/5] Update dotnet-desktop.yml --- .github/workflows/dotnet-desktop.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet-desktop.yml b/.github/workflows/dotnet-desktop.yml index a50cf44..744e4ca 100644 --- a/.github/workflows/dotnet-desktop.yml +++ b/.github/workflows/dotnet-desktop.yml @@ -3,7 +3,7 @@ name: Build and Test .NET Projects on: push: branches: - - main # Adjust the branch name as needed + - master # Adjust the branch name as needed jobs: build-and-test: