File tree Expand file tree Collapse file tree 12 files changed +122
-22
lines changed
AzureOpenAIProxy.PlaygroundApp
AzureOpenAIProxy.ServiceDefaults
test/AzureOpenAIProxy.AppHost.Tests/PlaygroundApp/Pages Expand file tree Collapse file tree 12 files changed +122
-22
lines changed Original file line number Diff line number Diff line change @@ -59,10 +59,18 @@ jobs:
5959 dotnet test ./test/AzureOpenAIProxy.AppHost.Tests --logger "trx" --collect:"XPlat Code Coverage"
6060 dotnet test ./test/AzureOpenAIProxy.ApiApp.Tests --logger "trx" --collect:"XPlat Code Coverage"
6161
62- # - name: Run integration tests
63- # shell: bash
64- # run: |
65- # dotnet test ./test/AzureOpenAIProxy.PlaygroundApp.Tests --logger "trx" --collect:"XPlat Code Coverage"
62+ - name : Run integration tests
63+ shell : bash
64+ run : |
65+ dotnet run --project ./src/AzureOpenAIProxy.AppHost &
66+
67+ DOTNET_PID=$!
68+
69+ sleep 30
70+
71+ dotnet test ./test/AzureOpenAIProxy.PlaygroundApp.Tests --logger "trx" --collect:"XPlat Code Coverage"
72+
73+ kill $DOTNET_PID
6674
6775 - name : Publish test results
6876 if : ${{ !cancelled() }}
Original file line number Diff line number Diff line change @@ -67,10 +67,24 @@ jobs:
6767 run : |
6868 dotnet build
6969
70- - name : Test solution
70+ - name : Run unit tests
7171 shell : bash
7272 run : |
73- dotnet test --logger "trx" --collect:"XPlat Code Coverage"
73+ dotnet test ./test/AzureOpenAIProxy.AppHost.Tests --logger "trx" --collect:"XPlat Code Coverage"
74+ dotnet test ./test/AzureOpenAIProxy.ApiApp.Tests --logger "trx" --collect:"XPlat Code Coverage"
75+
76+ - name : Run integration tests
77+ shell : bash
78+ run : |
79+ dotnet run --project ./src/AzureOpenAIProxy.AppHost &
80+
81+ DOTNET_PID=$!
82+
83+ sleep 30
84+
85+ dotnet test ./test/AzureOpenAIProxy.PlaygroundApp.Tests --logger "trx" --collect:"XPlat Code Coverage"
86+
87+ kill $DOTNET_PID
7488
7589 - name : Publish test results
7690 uses : bibipkins/dotnet-test-reporter@main
Original file line number Diff line number Diff line change 1515 <OpenTelemetryExtensionsVersion >1.*</OpenTelemetryExtensionsVersion >
1616 <OpenTelemetryInstrumentationVersion >1.*</OpenTelemetryInstrumentationVersion >
1717 <SwashbuckleVersion >6.*</SwashbuckleVersion >
18+ <FluentUIVersion >4.*</FluentUIVersion >
1819
1920 <CoverletVersion >6.*</CoverletVersion >
2021 <FluentAssertionsVersion >6.*</FluentAssertionsVersion >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >net8.0</TargetFramework >
5- <Nullable >enable</Nullable >
6- <ImplicitUsings >enable</ImplicitUsings >
7-
84 <AssemblyName >AzureOpenAIProxy.ApiApp</AssemblyName >
95 <RootNamespace >AzureOpenAIProxy.ApiApp</RootNamespace >
106 </PropertyGroup >
Original file line number Diff line number Diff line change 22
33 <PropertyGroup >
44 <OutputType >Exe</OutputType >
5- <TargetFramework >net8.0</TargetFramework >
6- <ImplicitUsings >enable</ImplicitUsings >
7- <Nullable >enable</Nullable >
85 <IsAspireHost >true</IsAspireHost >
6+
97 <UserSecretsId >f6c81741-4dbe-4a07-86e3-83a42810f5ec</UserSecretsId >
8+
9+ <AssemblyName >AzureOpenAIProxy.AppHost</AssemblyName >
10+ <RootNamespace >AzureOpenAIProxy.AppHost</RootNamespace >
1011 </PropertyGroup >
1112
1213 <ItemGroup >
Original file line number Diff line number Diff line change 11<Project Sdk =" Microsoft.NET.Sdk.Web" >
22
33 <PropertyGroup >
4- <TargetFramework >net8.0</TargetFramework >
5- <Nullable >enable</Nullable >
6- <ImplicitUsings >enable</ImplicitUsings >
7-
8-
94 <AssemblyName >AzureOpenAIProxy.PlaygroundApp</AssemblyName >
105 <RootNamespace >AzureOpenAIProxy.PlaygroundApp</RootNamespace >
116 </PropertyGroup >
127
138 <ItemGroup >
149 <PackageReference Include =" Azure.AI.OpenAI" Version =" $(AzureOpenAIVersion)" />
10+ <PackageReference Include =" Microsoft.FluentUI.AspNetCore.Components" Version =" $(FluentUIVersion)" />
11+ <PackageReference Include =" Microsoft.FluentUI.AspNetCore.Components.Emoji" Version =" $(FluentUIVersion)" />
12+ <PackageReference Include =" Microsoft.FluentUI.AspNetCore.Components.Icons" Version =" $(FluentUIVersion)" />
1513 </ItemGroup >
1614
1715 <ItemGroup >
Original file line number Diff line number Diff line change 88 <link rel =" stylesheet" href =" bootstrap/bootstrap.min.css" />
99 <link rel =" stylesheet" href =" app.css" />
1010 <link rel =" stylesheet" href =" AzureOpenAIProxy.PlaygroundApp.styles.css" />
11+ <link href =" _content/Microsoft.FluentUI.AspNetCore.Components/css/reboot.css" rel =" stylesheet" />
1112 <link rel =" icon" type =" image/png" href =" favicon.png" />
1213 <HeadOutlet />
1314</head >
1415
1516<body >
1617 <Routes />
1718 <script src =" _framework/blazor.web.js" ></script >
19+ <script src =" _content/Microsoft.FluentUI.AspNetCore.Components/Microsoft.FluentUI.AspNetCore.Components.lib.module.js" type =" module" async ></script >
1820</body >
1921
2022</html >
Original file line number Diff line number Diff line change 2121 <a href =" " class =" reload" >Reload</a >
2222 <a class =" dismiss" >🗙</a >
2323</div >
24+
25+ <FluentToastProvider />
26+ <FluentDialogProvider />
27+ <FluentTooltipProvider />
28+ <FluentMessageBarProvider />
Original file line number Diff line number Diff line change 11@using System .Net .Http
22@using System .Net .Http .Json
3+
34@using Microsoft .AspNetCore .Components .Forms
45@using Microsoft .AspNetCore .Components .Routing
56@using Microsoft .AspNetCore .Components .Web
6- @using static Microsoft .AspNetCore .Components .Web .RenderMode
77@using Microsoft .AspNetCore .Components .Web .Virtualization
8+
9+ @using Microsoft .FluentUI .AspNetCore .Components
10+
811@using Microsoft .JSInterop
12+
13+ @using static Microsoft .AspNetCore .Components .Web .RenderMode
14+
915@using AzureOpenAIProxy .PlaygroundApp
1016@using AzureOpenAIProxy .PlaygroundApp .Components
Original file line number Diff line number Diff line change 11using AzureOpenAIProxy . PlaygroundApp . Clients ;
22
3+ using Microsoft . FluentUI . AspNetCore . Components ;
4+
35using App = AzureOpenAIProxy . PlaygroundApp . Components . App ;
46
57var builder = WebApplication . CreateBuilder ( args ) ;
1012builder . Services . AddRazorComponents ( )
1113 . AddInteractiveServerComponents ( ) ;
1214
15+ builder . Services . AddFluentUIComponents ( ) ;
16+
1317builder . Services . AddScoped < IOpenAIApiClient , OpenAIApiClient > ( ) ;
1418
1519var app = builder . Build ( ) ;
You can’t perform that action at this time.
0 commit comments