Skip to content

Commit 4d1f096

Browse files
Merge branch 'jlester/try-net-2' of https://github.com/Joshua-Lester3/EssentialCSharp.Web into jlester/try-net-2
2 parents 2c3e7a8 + cbc08d5 commit 4d1f096

8 files changed

Lines changed: 67 additions & 21 deletions

File tree

.github/workflows/Build-Test-And-Deploy.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,24 +43,31 @@ jobs:
4343
- name: Build with dotnet
4444
run: dotnet build -p:ContinuousIntegrationBuild=True -p:ReleaseDateAttribute=True --configuration Release --no-restore
4545

46+
- name: Expose GitHub Actions Runtime
47+
uses: actions/github-script@v8
48+
with:
49+
script: |
50+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']);
51+
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']);
52+
4653
- name: Run .NET Tests
4754
run: dotnet test --no-build --configuration Release
4855

4956
- name: Set up Docker Buildx
50-
uses: docker/setup-buildx-action@v3
57+
uses: docker/setup-buildx-action@v4
5158

5259
# Build but no push with a PR
5360
- name: Docker build (no push)
5461
if: github.event_name == 'pull_request' || github.event_name == 'merge_group'
55-
uses: docker/build-push-action@v6
62+
uses: docker/build-push-action@v7
5663
with:
5764
push: false
5865
tags: temp-pr-validation
5966
file: ./EssentialCSharp.Web/Dockerfile
6067

6168
- name: Build Container Image
6269
if: github.event_name != 'pull_request_target' && github.event_name != 'pull_request'
63-
uses: docker/build-push-action@v6
70+
uses: docker/build-push-action@v7
6471
with:
6572
tags: ${{ vars.DEVCONTAINER_REGISTRY }}/essentialcsharpweb:${{ github.sha }},${{ vars.DEVCONTAINER_REGISTRY }}/essentialcsharpweb:latest,${{ vars.PRODCONTAINER_REGISTRY }}/essentialcsharpweb:${{ github.sha }},${{ vars.PRODCONTAINER_REGISTRY }}/essentialcsharpweb:latest
6673
file: ./EssentialCSharp.Web/Dockerfile
@@ -106,7 +113,7 @@ jobs:
106113
docker image ls -a
107114
108115
- name: Log in to container registry
109-
uses: docker/login-action@v3
116+
uses: docker/login-action@v4
110117
with:
111118
registry: ${{ vars.DEVCONTAINER_REGISTRY }}
112119
username: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }}
@@ -179,7 +186,7 @@ jobs:
179186
needs: [deploy-development]
180187
concurrency:
181188
group: deploy-production
182-
cancel-in-progress: false
189+
cancel-in-progress: true
183190
environment:
184191
name: "Production"
185192

@@ -203,7 +210,7 @@ jobs:
203210
docker image ls -a
204211
205212
- name: Log in to container registry
206-
uses: docker/login-action@v3
213+
uses: docker/login-action@v4
207214
with:
208215
registry: ${{ vars.PRODCONTAINER_REGISTRY }}
209216
username: ${{ secrets.ESSENTIALCSHARP_ACR_USERNAME }}

.github/workflows/PR-Build-And-Test.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ jobs:
3434
- name: Build with dotnet
3535
run: dotnet build --configuration Release --no-restore /p:AccessToNugetFeed=false
3636

37+
- name: Expose GitHub Actions Runtime
38+
uses: actions/github-script@v8
39+
with:
40+
script: |
41+
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env['ACTIONS_RUNTIME_TOKEN']);
42+
core.exportVariable('ACTIONS_RESULTS_URL', process.env['ACTIONS_RESULTS_URL']);
43+
3744
- name: Run .NET Tests
3845
run: dotnet test --no-build --configuration Release --report-trx --coverage --results-directory ${{ runner.temp }}
3946

@@ -45,10 +52,10 @@ jobs:
4552
output-directory: '${{ runner.temp }}/vsplaylists'
4653

4754
- name: Set up Docker Buildx
48-
uses: docker/setup-buildx-action@v3
55+
uses: docker/setup-buildx-action@v4
4956

5057
- name: Build Container Image
51-
uses: docker/build-push-action@v6
58+
uses: docker/build-push-action@v7
5259
with:
5360
file: ./EssentialCSharp.Web/Dockerfile
5461
context: .

.github/workflows/copilot-setup-steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
run: dotnet test --no-build --configuration Release
5151

5252
- name: Set up Docker Buildx
53-
uses: docker/setup-buildx-action@v3
53+
uses: docker/setup-buildx-action@v4
5454

5555
- name: Set up Node.js for frontend development
5656
uses: actions/setup-node@v6

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ EssentialCSharpManuscript.[0-9]
66
.vs/
77
obj
88
bin
9+
TestResults/
910
~$*.do[ct]x
1011
~*.tmp
1112
~$*.dotm

Directory.Packages.props

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<PropertyGroup>
33
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
44
<CentralPackageTransitivePinningEnabled>false</CentralPackageTransitivePinningEnabled>
5-
<ToolingPackagesVersion>1.1.1.18791</ToolingPackagesVersion>
5+
<ToolingPackagesVersion>1.1.1.18869</ToolingPackagesVersion>
66
<AccessToNugetFeed>false</AccessToNugetFeed>
77
<RestoreSources>
88
https://api.nuget.org/v3/index.json;
@@ -12,40 +12,43 @@
1212
https://pkgs.dev.azure.com/intelliTect/_packaging/EssentialCSharp/nuget/v3/index.json;
1313
</RestoreSources>
1414
</PropertyGroup>
15+
<PropertyGroup>
16+
<SemanticKernelVersion>1.72.0</SemanticKernelVersion>
17+
</PropertyGroup>
1518
<ItemGroup Condition="$(AccessToNugetFeed)">
1619
<PackageVersion Include="ContentFeedNuget" Version="$(ToolingPackagesVersion)" />
1720
</ItemGroup>
1821
<ItemGroup>
1922
<PackageVersion Include="AspNet.Security.OAuth.GitHub" Version="10.0.0" />
2023
<PackageVersion Include="Azure.Extensions.AspNetCore.Configuration.Secrets" Version="1.5.0" />
21-
<PackageVersion Include="Azure.Identity" Version="1.18.0" />
24+
<PackageVersion Include="Azure.Identity" Version="1.19.0" />
2225
<PackageVersion Include="Azure.Monitor.OpenTelemetry.AspNetCore" Version="1.4.0" />
2326
<PackageVersion Include="Microsoft.ApplicationInsights.Profiler.AspNetCore" Version="3.0.1" />
24-
<PackageVersion Include="TUnit" Version="1.18.21" />
27+
<PackageVersion Include="TUnit" Version="1.19.22" />
2528
<PackageVersion Include="EssentialCSharp.Shared.Models" Version="$(ToolingPackagesVersion)" />
2629
<PackageVersion Include="HtmlAgilityPack" Version="1.12.4" />
2730
<PackageVersion Include="IntelliTect.Multitool" Version="2.0.0" />
2831
<PackageVersion Include="Mailjet.Api" Version="4.0.0" />
29-
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="10.0.3" />
30-
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.3" />
31-
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="10.0.3" />
32+
<PackageVersion Include="Microsoft.AspNetCore.Authentication.MicrosoftAccount" Version="10.0.4" />
33+
<PackageVersion Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="10.0.4" />
34+
<PackageVersion Include="Microsoft.AspNetCore.Identity.UI" Version="10.0.4" />
3235
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="10.0.3" />
3336
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.3" />
3437
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="5.0.0" />
3538
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="5.0.0" />
3639
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="10.0.3" />
3740
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="10.0.3" />
3841
<PackageVersion Include="Microsoft.EntityFrameworkCore.Tools" Version="10.0.3" />
39-
<PackageVersion Include="Microsoft.SemanticKernel" Version="1.72.0" />
40-
<PackageVersion Include="Microsoft.SemanticKernel.Connectors.PgVector" Version="1.70.0-preview" />
41-
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.103" />
42+
<PackageVersion Include="Microsoft.SemanticKernel" Version="$(SemanticKernelVersion)" />
43+
<PackageVersion Include="Microsoft.SemanticKernel.Connectors.PgVector" Version="$(SemanticKernelVersion)-preview" />
44+
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="10.0.200" />
4245
<PackageVersion Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.23.0" />
4346
<PackageVersion Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="10.0.2" />
4447
<PackageVersion Include="ModelContextProtocol" Version="0.3.0-preview.4" />
4548
<PackageVersion Include="ModelContextProtocol.AspNetCore" Version="0.3.0-preview.4" />
4649
<PackageVersion Include="Moq" Version="4.20.72" />
4750
<PackageVersion Include="Moq.AutoMock" Version="3.6.1" />
48-
<PackageVersion Include="System.CommandLine" Version="2.0.3" />
51+
<PackageVersion Include="System.CommandLine" Version="2.0.4" />
4952
<PackageVersion Include="Newtonsoft.Json" Version="13.0.4" />
5053
<PackageVersion Include="Octokit" Version="14.0.0" />
5154
<PackageVersion Include="DotnetSitemapGenerator" Version="2.0.0" />
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
using EssentialCSharp.Chat.Common.Models;
2+
using Microsoft.SemanticKernel.Connectors.PgVector;
3+
4+
namespace EssentialCSharp.Chat.Tests;
5+
6+
public class PgVectorConnectorTests
7+
{
8+
/// <summary>
9+
/// Verifies that PostgresVectorStore.GetCollection does not throw a TypeLoadException,
10+
/// which would indicate a version mismatch between Microsoft.SemanticKernel core and
11+
/// Microsoft.SemanticKernel.Connectors.PgVector (e.g., missing vtable slots on
12+
/// internal types like PostgresModelBuilder).
13+
/// </summary>
14+
[Test]
15+
public async Task GetCollection_WithBookContentChunk_DoesNotThrowTypeLoadException()
16+
{
17+
// Arrange — no real DB connection is needed; connections are only opened for actual queries
18+
#pragma warning disable SKEXP0010 // PostgresVectorStore is experimental
19+
using var store = new PostgresVectorStore("Host=localhost;Database=test;Username=test;Password=test");
20+
21+
// Act — this triggers loading internal PostgresModelBuilder via PostgresCollection ctor
22+
var collection = store.GetCollection<string, BookContentChunk>("test-collection");
23+
#pragma warning restore SKEXP0010
24+
25+
// Assert
26+
await Assert.That(collection).IsNotNull();
27+
}
28+
}

EssentialCSharp.Web/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ WORKDIR /app
55
EXPOSE 8080
66
EXPOSE 8081
77

8-
FROM mcr.microsoft.com/dotnet/sdk:10.0.103 AS build
8+
FROM mcr.microsoft.com/dotnet/sdk:10.0.200 AS build
99
ARG ACCESS_TO_NUGET_FEED=true
1010
ENV ACCESS_TO_NUGET_FEED=$ACCESS_TO_NUGET_FEED
1111
RUN sh -c "$(curl -fsSL https://aka.ms/install-artifacts-credprovider.sh)"

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"sdk": {
3-
"version": "10.0.103",
3+
"version": "10.0.200",
44
"rollForward": "latestMinor"
55
},
66
"test": {

0 commit comments

Comments
 (0)