From 3171dfe95d05733cf9a42b91cd277a334de26fa6 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Wed, 28 Aug 2024 13:53:18 -0400 Subject: [PATCH] Re-created a GitHub build & test pipeline * Updated UnitTests.csproj to use the latest MSTest.Adaptor/Framework nugets * Use `dotnet test` to run the unit tests --- .github/workflows/main.yml | 43 +++++++++++++++++++++++++++++++++ Test/UnitTests/UnitTests.csproj | 5 ++-- 2 files changed, 46 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..749f9ba --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,43 @@ +name: Build Managed + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + managed-build: + runs-on: windows-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 # avoid shallow clone so nbgv can do its work. + + - name: Setup .NET + uses: actions/setup-dotnet@v2 + with: + dotnet-version: 6.0.x + + - name: Setup MSBuild.exe + uses: microsoft/setup-msbuild@v1.0.2 + + - name: Restore + run: nuget restore src\BehaviorsSdk.sln + + - name: Build + run: msbuild src\BehaviorsSdk.sln /p:Configuration=Release /p:SignType=real + + - name: Run Tests + run: dotnet test Test\UnitTests\UnitTests.csproj + + - name: Pack Behaviors + if: success() + run: msbuild src\Microsoft.Xaml.Behaviors\Microsoft.Xaml.Behaviors.csproj /p:Configuration=Release -t:pack + + - name: Upload NuGet Artifacts + if: success() + uses: actions/upload-artifact@v2 + with: + path: src\Microsoft.Xaml.Behaviors\bin\Release\*.nupkg diff --git a/Test/UnitTests/UnitTests.csproj b/Test/UnitTests/UnitTests.csproj index 635b46a..2959f00 100644 --- a/Test/UnitTests/UnitTests.csproj +++ b/Test/UnitTests/UnitTests.csproj @@ -7,16 +7,17 @@ UnitTests UnitTests true + true ..\UnitTests.snk - 3.0.2 + 3.5.2 - 3.0.2 + 3.5.2