11
11
framework :
12
12
- 9.0.x
13
13
- 8.0.x
14
- - net452
14
+ - v4.8.1
15
+ - v4.5.2
15
16
16
17
steps :
17
18
# 1. Checkout repository
@@ -20,14 +21,14 @@ jobs:
20
21
21
22
# 2. Setup .NET SDK (for .NET Core / Modern .NET)
22
23
- name : Setup .NET SDK
23
- if : " !startsWith(matrix.framework, 'net ')"
24
+ if : " !startsWith(matrix.framework, 'v ')"
24
25
uses : actions/setup-dotnet@v4
25
26
with :
26
27
dotnet-version : ${{ matrix.framework }}
27
28
28
29
# 3. Install NuGet CLI (for .NET Framework)
29
30
- name : Install NuGet CLI
30
- if : startsWith(matrix.framework, 'net4 ')
31
+ if : startsWith(matrix.framework, 'v ')
31
32
uses : NuGet/setup-nuget@v2
32
33
with :
33
34
nuget-version : ' 5.x'
@@ -37,16 +38,16 @@ jobs:
37
38
shell : pwsh
38
39
run : |
39
40
Write-Host "🔄 Restoring dependencies for: ${{ matrix.framework }}"
40
- if (!startsWith("${{ matrix.framework }}", "net ")) { dotnet restore }
41
- if (startsWith("${{ matrix.framework }}", "net ")) { nuget.exe restore CloudinaryDotNet.sln }
41
+ if (!startsWith("${{ matrix.framework }}", "v ")) { dotnet restore }
42
+ if (startsWith("${{ matrix.framework }}", "v ")) { nuget.exe restore CloudinaryDotNet.sln }
42
43
43
44
# 5. Build Solution
44
45
- name : Build Solution
45
46
shell : pwsh
46
47
run : |
47
48
Write-Host "⚒️ Building for: ${{ matrix.framework }}"
48
- if (!startsWith("${{ matrix.framework }}", "net ")) { dotnet build --configuration Release --no-restore }
49
- if (startsWith("${{ matrix.framework }}", "net ")) { msbuild CloudinaryDotNet.sln /p:Configuration=Release }
49
+ if (!startsWith("${{ matrix.framework }}", "v ")) { dotnet build --configuration Release --no-restore }
50
+ if (startsWith("${{ matrix.framework }}", "v ")) { msbuild CloudinaryDotNet.sln /p:Configuration=Release /p:TargetFrameworkVersion=${{ matrix.framework }} }
50
51
51
52
# 6. Run before_build.ps1
52
53
- name : Run before_build.ps1
@@ -58,13 +59,13 @@ jobs:
58
59
shell : pwsh
59
60
run : |
60
61
Write-Host "🧪 Running Unit Tests for: ${{ matrix.framework }}"
61
- if (!startsWith("${{ matrix.framework }}", "net ")) { dotnet test "./CloudinaryDotNet.Tests/CloudinaryDotNet.Tests.csproj" --configuration Release --no-build }
62
- if (startsWith("${{ matrix.framework }}", "net ")) { vstest.console.exe "./CloudinaryDotNet.Tests/bin/Release/${{ matrix.framework }}/CloudinaryDotNet.Tests.dll" }
62
+ if (!startsWith("${{ matrix.framework }}", "v ")) { dotnet test "./CloudinaryDotNet.Tests/CloudinaryDotNet.Tests.csproj" --configuration Release --no-build }
63
+ if (startsWith("${{ matrix.framework }}", "v ")) { vstest.console.exe "./CloudinaryDotNet.Tests/bin/Release/${{ matrix.framework }}/CloudinaryDotNet.Tests.dll" /Framework:${{ matrix.framework }} }
63
64
64
65
# 8. Run Integration Tests
65
66
- name : Run Integration Tests
66
67
shell : pwsh
67
68
run : |
68
69
Write-Host "🧪 Running Integration Tests for: ${{ matrix.framework }}"
69
- if (!startsWith("${{ matrix.framework }}", "net ")) { dotnet test "./CloudinaryDotNet.IntegrationTests/CloudinaryDotNet.IntegrationTests.csproj" --configuration Release --no-build }
70
- if (startsWith("${{ matrix.framework }}", "net ")) { vstest.console.exe "./CloudinaryDotNet.IntegrationTests/bin/Release/${{ matrix.framework }}/CloudinaryDotNet.IntegrationTests.dll" }
70
+ if (!startsWith("${{ matrix.framework }}", "v ")) { dotnet test "./CloudinaryDotNet.IntegrationTests/CloudinaryDotNet.IntegrationTests.csproj" --configuration Release --no-build }
71
+ if (startsWith("${{ matrix.framework }}", "v ")) { vstest.console.exe "./CloudinaryDotNet.IntegrationTests/bin/Release/${{ matrix.framework }}/CloudinaryDotNet.IntegrationTests.dll" /Framework:${{ matrix.framework }} }
0 commit comments