diff --git a/.github/workflows/Bonsai.yml b/.github/workflows/Bonsai.yml index 08b80cf9..6c8ffdf1 100644 --- a/.github/workflows/Bonsai.yml +++ b/.github/workflows/Bonsai.yml @@ -101,7 +101,7 @@ jobs: release_version: ${{github.event.release.tag_name}} workflow_dispatch_version: ${{github.event.inputs.version}} workflow_dispatch_will_publish_packages: ${{github.event.inputs.will_publish_packages}} - + # ----------------------------------------------------------------------- Build - name: Restore run: dotnet restore Bonsai.sln @@ -122,9 +122,15 @@ jobs: run: dotnet pack Bonsai.sln --no-restore --no-build --configuration ${{matrix.configuration}} # ----------------------------------------------------------------------- Test - - name: Test + - name: Test .NET Framework 4.7.2 + if: '!matrix.dummy-build' + run: dotnet test Bonsai.sln --no-restore --no-build --configuration ${{matrix.configuration}} --verbosity normal --framework net472 + - name: Test .NET 8 if: '!matrix.dummy-build' - run: dotnet test Bonsai.sln --no-restore --no-build --configuration ${{matrix.configuration}} --verbosity normal + run: dotnet test Bonsai.sln --no-restore --no-build --configuration ${{matrix.configuration}} --verbosity normal --framework net8.0 + - name: Test .NET 8 Windows + if: ${{!matrix.dummy-build && matrix.platform.rid == 'win-x64'}} + run: dotnet test Bonsai.sln --no-restore --no-build --configuration ${{matrix.configuration}} --verbosity normal --framework net8.0-windows # ----------------------------------------------------------------------- Create portable zip - name: Create portable zip @@ -153,7 +159,7 @@ jobs: id: create-installer if: matrix.create-installer run: msbuild /nologo /maxCpuCount Bonsai.Setup.sln /p:Configuration=${{matrix.configuration}} - + # ----------------------------------------------------------------------- Collect artifacts - name: Collect NuGet packages uses: actions/upload-artifact@v4 @@ -412,7 +418,7 @@ jobs: env: version_file_path: tooling/CurrentVersion.props just_released_version: ${{github.event.release.tag_name}} - + # ----------------------------------------------------------------------- Commit and push changes - name: Commit changes if: steps.main-revision.outputs.sha == github.sha diff --git a/Bonsai.Core.Tests/Bonsai.Core.Tests.csproj b/Bonsai.Core.Tests/Bonsai.Core.Tests.csproj index b56a04f6..35c6bb32 100644 --- a/Bonsai.Core.Tests/Bonsai.Core.Tests.csproj +++ b/Bonsai.Core.Tests/Bonsai.Core.Tests.csproj @@ -1,7 +1,5 @@  - false - false net472;net8.0 diff --git a/Bonsai.Editor.Tests/Bonsai.Editor.Tests.csproj b/Bonsai.Editor.Tests/Bonsai.Editor.Tests.csproj index 3af5fed9..0669cd7b 100644 --- a/Bonsai.Editor.Tests/Bonsai.Editor.Tests.csproj +++ b/Bonsai.Editor.Tests/Bonsai.Editor.Tests.csproj @@ -1,7 +1,5 @@  - false - false net472;net8.0-windows diff --git a/Bonsai.System.Tests/Bonsai.System.Tests.csproj b/Bonsai.System.Tests/Bonsai.System.Tests.csproj index 5fd9c1a6..4dd5c23f 100644 --- a/Bonsai.System.Tests/Bonsai.System.Tests.csproj +++ b/Bonsai.System.Tests/Bonsai.System.Tests.csproj @@ -1,7 +1,5 @@  - false - false net472;net8.0 diff --git a/tooling/Common.Tests.csproj.props b/tooling/Common.Tests.csproj.props new file mode 100644 index 00000000..ace043ee --- /dev/null +++ b/tooling/Common.Tests.csproj.props @@ -0,0 +1,24 @@ + + + + false + false + + + + + <_PermittedTestFramework Remove="*" /> + <_PermittedTestFramework Include="net472" /> + <_PermittedTestFramework Include="net8.0" /> + <_PermittedTestFramework Include="net8.0-windows" /> + + + <_IsPermittedTestFramework>false + <_IsPermittedTestFramework Condition="'%(_PermittedTestFramework.Identity)' == '$(TargetFramework)'">true + + + + \ No newline at end of file diff --git a/tooling/Common.csproj.props b/tooling/Common.csproj.props index 81d84f58..11057cad 100644 --- a/tooling/Common.csproj.props +++ b/tooling/Common.csproj.props @@ -42,4 +42,5 @@ none + \ No newline at end of file