Skip to content

Commit 948bf6d

Browse files
committed
Multitarget tests, update workflows
1 parent d682e60 commit 948bf6d

File tree

4 files changed

+30
-2
lines changed

4 files changed

+30
-2
lines changed

.github/workflows/live-test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,17 @@ jobs:
2121
with:
2222
dotnet-version: '9.x'
2323

24+
- name: Setup .NET 8
25+
uses: actions/setup-dotnet@v3
26+
with:
27+
dotnet-version: '8.x'
28+
2429
- name: Checkout code
2530
uses: actions/checkout@v2
2631

2732
- name: Run live tests
2833
run: dotnet test ./tests/OpenAI.Tests.csproj
34+
--framework net8.0
2935
--configuration Release
3036
--filter="TestCategory!=Smoke&TestCategory!=Assistants&TestCategory!=Images&TestCategory!=Uploads&TestCategory!=Moderations&TestCategory!=FineTuning&TestCategory!=Conversation&TestCategory!=Manual"
3137
--logger "trx;LogFilePrefix=live"

.github/workflows/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ jobs:
2222
with:
2323
dotnet-version: '9.x'
2424

25+
- name: Setup .NET 8
26+
uses: actions/setup-dotnet@v3
27+
with:
28+
dotnet-version: '8.x'
29+
2530
- name: Checkout code
2631
uses: actions/checkout@v2
2732

@@ -33,6 +38,16 @@ jobs:
3338

3439
- name: Run unit tests
3540
run: dotnet test
41+
--framework net9.0
42+
--configuration Release
43+
--filter="TestCategory=Smoke&TestCategory!=Manual"
44+
--logger "trx;LogFilePrefix=smoke"
45+
--results-directory ${{github.workspace}}/artifacts/test-results
46+
${{ env.version_suffix_args}}
47+
48+
- name: Run unit tests .NET 8
49+
run: dotnet test
50+
--framework net8.0
3651
--configuration Release
3752
--filter="TestCategory=Smoke&TestCategory!=Manual"
3853
--logger "trx;LogFilePrefix=smoke"

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@ jobs:
2727
with:
2828
dotnet-version: '9.x'
2929

30+
- name: Setup .NET 8
31+
uses: actions/setup-dotnet@v3
32+
with:
33+
dotnet-version: '8.x'
34+
3035
- name: Checkout code
3136
uses: actions/checkout@v2
3237

@@ -41,13 +46,15 @@ jobs:
4146

4247
- name: Unit Test
4348
run: dotnet test
49+
--framework net8.0
4450
--configuration Release
4551
--filter="TestCategory=Smoke&TestCategory!=Manual"
4652
--logger "trx;LogFileName=${{ github.workspace }}/artifacts/test-results/smoke.trx"
4753
${{ env.version_suffix_args }}
4854

4955
- name: Run Live Tests
5056
run: dotnet test ./tests/OpenAI.Tests.csproj
57+
--framework net8.0
5158
--configuration Release
5259
--filter="TestCategory!=Smoke&TestCategory!=Assistants&TestCategory!=Images&TestCategory!=Uploads&TestCategory!=Moderations&TestCategory!=FineTuning&TestCategory!=Conversation&TestCategory!=Manual"
5360
--logger "trx;LogFilePrefix=live"

tests/OpenAI.Tests.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net8.0</TargetFramework>
3+
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
44

55
<!--Ignore XML doc comments on test types and members-->
66
<NoWarn>$(NoWarn);CS1591</NoWarn>
@@ -10,7 +10,7 @@
1010

1111
<LangVersion>latest</LangVersion>
1212
</PropertyGroup>
13-
13+
1414
<PropertyGroup Condition="'$(Configuration)' != 'Unsigned'">
1515
<!-- Sign the assembly with the specified key file. -->
1616
<SignAssembly>true</SignAssembly>

0 commit comments

Comments
 (0)