Skip to content

Commit f5ad7ec

Browse files
committed
refactor: consolidate .NET Framework testing into unified script
- Replaced multiple test commands with a comprehensive PowerShell script for .NET Framework testing - Added support for multiple platforms (AnyCPU, x86, x64) and flexible test configurations - Improved error handling and validation of test DLLs before execution - Added detailed logging and status reporting for each build/test step - Consolidated package restore logic to handle both packages.config and PackageReference projects
1 parent e1f6248 commit f5ad7ec

File tree

7 files changed

+406
-291
lines changed

7 files changed

+406
-291
lines changed

.github/workflows/dotnet-core.yml

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -150,27 +150,17 @@ jobs:
150150
uses: microsoft/[email protected]
151151
if: matrix.os == 'windows-latest' && matrix.test_legacy
152152

153+
153154
- name: Test win_x86
154155
if: matrix.test_legacy
155156
run: |
156157
dotnet test ${{ env.CORE_SLN }} -c Release --arch x86
157158
158-
- name: Build legacy projects on Windows
159-
if: matrix.test_legacy
160-
run: |
161-
dotnet restore ${{ env.FULL_SLN }}
162-
nuget restore ${{ env.FULL_SLN }} -SolutionDirectory src
163-
msbuild ${{ env.FULL_SLN }} /p:Configuration=Release /p:Platform="Any CPU"
164-
165-
- name: Legacy - Test Imageflow.TestDotNetFull and Imageflow.TestDotNetFullPackageReference
159+
- name: Build and test .NET Framework projects
166160
if: matrix.test_legacy
161+
shell: pwsh
167162
run: |
168-
dotnet test tests/Imageflow.TestDotNetFull/bin/Release/Imageflow.TestDotNetFull.dll
169-
dotnet test tests/Imageflow.TestDotNetFullPackageReference/bin/Release/Imageflow.TestDotNetFullPackageReference.dll
170-
dotnet test tests/Imageflow.TestDotNetFull/bin/Release/Imageflow.TestDotNetFull.dll --platform:x86
171-
dotnet test tests/Imageflow.TestDotNetFullPackageReference/bin/Release/Imageflow.TestDotNetFullPackageReference.dll --platform:x86
172-
dotnet test tests/Imageflow.TestDotNetFull/bin/Release/Imageflow.TestDotNetFull.dll --platform:x64
173-
dotnet test tests/Imageflow.TestDotNetFullPackageReference/bin/Release/Imageflow.TestDotNetFullPackageReference.dll --platform:x64
163+
./test_dotnet_framework.ps1 -Solution "${{ env.FULL_SLN }}" -SkipPack
174164
175165
- name: Test use in an AOT web app
176166
if: matrix.test_aot

0 commit comments

Comments
 (0)