Skip to content

Commit 5e88c56

Browse files
add framework
1 parent b8e2998 commit 5e88c56

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/test-framework.yaml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: .NET Framework Test 🚀
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
build:
7+
runs-on: windows-latest
8+
strategy:
9+
matrix:
10+
framework-version:
11+
- net481
12+
- net452
13+
steps:
14+
# 1. Checkout repository
15+
- name: Checkout Code
16+
uses: actions/checkout@v4
17+
18+
# 2. Install NuGet CLI
19+
- name: Install NuGet CLI
20+
uses: NuGet/setup-nuget@v2
21+
with:
22+
nuget-version: '5.x'
23+
24+
# 3. Setup MSBuild
25+
- name: Setup MSBuild
26+
uses: microsoft/setup-msbuild@v2
27+
28+
# 4. Restore Dependencies
29+
- name: Restore Dependencies
30+
run: nuget restore CloudinaryDotNet.sln
31+
32+
# 5. Build the Solution
33+
- name: Build Solution for ${{ matrix.framework-version }}
34+
run: |
35+
msbuild CloudinaryDotNet.sln /p:Configuration=Release /p:TargetFrameworkVersion=${{ matrix.framework-version }}
36+
37+
# 6. Run before_build.ps1
38+
- name: Run Before Build
39+
shell: pwsh
40+
run: . ./before_build.ps1
41+
42+
# 7. Run Unit Tests
43+
- name: Run Unit Tests for ${{ matrix.framework-version }}
44+
run: |
45+
vstest.console.exe "./CloudinaryDotNet.Tests/bin/Release/${{ matrix.framework-version }}/CloudinaryDotNet.Tests.dll" /Framework:${{ matrix.framework-version }}
46+
47+
# 8. Run Integration Tests
48+
- name: Run Integration Tests for ${{ matrix.framework-version }}
49+
run: |
50+
vstest.console.exe "./CloudinaryDotNet.IntegrationTests/bin/Release/${{ matrix.framework-version }}/CloudinaryDotNet.IntegrationTests.dll" /Framework:${{ matrix.framework-version }}

0 commit comments

Comments
 (0)