Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions .github/workflows/live-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,16 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Run live tests
- name: Restore tools
run: dotnet tool restore --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json

- name: Run recorded tests
run: dotnet test ./tests/OpenAI.Tests.csproj
--configuration Release
--filter="TestCategory!=Smoke&TestCategory!=Assistants&TestCategory!=StoredChat&TestCategory!=Images&TestCategory!=Uploads&TestCategory!=Moderations&TestCategory!=FineTuning&TestCategory!=Containers&TestCategory!=Conversation&TestCategory!=MCP&TestCategory!=Manual"
--filter="(TestCategory=Chat|TestCategory=Embeddings|TestCategory=Responses)&TestCategory!=MPFD"
--logger "trx;LogFilePrefix=live"
--results-directory ${{github.workspace}}/artifacts/test-results
${{ env.version_suffix_args}}
--results-directory ${{ github.workspace }}/artifacts/test-results
${{ env.version_suffix_args }}
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,29 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: Restore tools
run: dotnet tool restore --add-source https://pkgs.dev.azure.com/azure-sdk/public/_packaging/azure-sdk-for-net/nuget/v3/index.json

# Pack the client NuGet package and include URL back to the repository and release tag
- name: Build and Pack
- name: Build and pack
run: dotnet pack
--configuration Release
--output "${{ github.workspace }}/artifacts/packages"
/p:PackageProjectUrl="${{ github.server_url }}/${{ github.repository }}/tree/${{ github.event.release.tag_name }}"
/p:PackageReleaseNotes="${{ github.server_url }}/${{ github.repository }}/blob/${{ github.event.release.tag_name }}/CHANGELOG.md"
${{ env.version_suffix_args }}

- name: Unit Test
- name: Run unit tests
run: dotnet test
--configuration Release
--filter="TestCategory=Smoke&TestCategory!=Manual"
--logger "trx;LogFileName=${{ github.workspace }}/artifacts/test-results/smoke.trx"
${{ env.version_suffix_args }}

- name: Run Live Tests
- name: Run recorded tests
run: dotnet test ./tests/OpenAI.Tests.csproj
--configuration Release
--filter="TestCategory!=Smoke&TestCategory!=Assistants&TestCategory!=StoredChat&TestCategory!=Images&TestCategory!=Uploads&TestCategory!=Moderations&TestCategory!=FineTuning&TestCategory!=Containers&TestCategory!=Conversation&TestCategory!=MCP&TestCategory!=Manual"
--filter="(TestCategory=Chat|TestCategory=Embeddings|TestCategory=Responses)&TestCategory!=MPFD"
--logger "trx;LogFilePrefix=live"
--results-directory ${{ github.workspace }}/artifacts/test-results
${{ env.version_suffix_args }}
Expand Down Expand Up @@ -118,7 +121,7 @@ jobs:
path: ${{ github.workspace }}/build-artifacts

deploy:
name: Publish Package
name: Publish package
needs: sign
runs-on: ubuntu-latest
steps:
Expand Down
3 changes: 2 additions & 1 deletion tests/Chat/ChatStoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@

namespace OpenAI.Tests.Chat;

[Category("StoredChat")]
[Category("Chat")]
[Category("ChatStore")]
public class ChatStoreTests : OpenAIRecordedTestBase
{
public ChatStoreTests(bool isAsync) : base(isAsync)
Expand Down
1 change: 1 addition & 0 deletions tests/Chat/ChatTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -786,6 +786,7 @@ public async Task WebSearchWorks()
}

[RecordedTest]
[Category("MPFD")]
public async Task FileIdContentWorks()
{
OpenAIFileClient fileClient = GetProxiedOpenAIClient<OpenAIFileClient>(TestScenario.Files);
Expand Down
1 change: 1 addition & 0 deletions tests/Chat/ChatToolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace OpenAI.Tests.Chat;

[Category("Chat")]
[Category("ChatTools")]
public class ChatToolTests : OpenAIRecordedTestBase
{
public enum SchemaPresence { WithSchema, WithoutSchema }
Expand Down
1 change: 1 addition & 0 deletions tests/Responses/ResponseStoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace OpenAI.Tests.Responses;
#pragma warning disable OPENAICUA001

[Category("Responses")]
[Category("ResponsesStore")]
public partial class ResponseStoreTests : OpenAIRecordedTestBase
{
public ResponseStoreTests(bool isAsync) : base(isAsync)
Expand Down
2 changes: 1 addition & 1 deletion tests/Responses/ResponsesToolTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
namespace OpenAI.Tests.Responses;

[Category("Responses")]
[Category("MCP")]
[Category("ResponsesTools")]
public partial class ResponsesToolTests : OpenAIRecordedTestBase
{
public ResponsesToolTests(bool isAsync) : base(isAsync)
Expand Down