Merge pull request #43 from StevanFreeborn/stevanfreeborn/feat/🥳-upgrade-to-dotnet-10
feat: upgrade to .NET 10
This commit is contained in:
@@ -33,10 +33,10 @@ jobs:
|
||||
run: dotnet build --no-restore
|
||||
- name: Install playwright dependencies
|
||||
shell: pwsh
|
||||
run: ./test/Blog.Tests/bin/Debug/net9.0/playwright.ps1 install-deps
|
||||
run: ./test/Blog.Tests/bin/Debug/net10.0/playwright.ps1 install-deps
|
||||
- name: Install playwright
|
||||
shell: pwsh
|
||||
run: ./test/Blog.Tests/bin/Debug/net9.0/playwright.ps1 install
|
||||
run: ./test/Blog.Tests/bin/Debug/net10.0/playwright.ps1 install
|
||||
- name: Test project
|
||||
run: dotnet test -e DOTNET_ENVIRONMENT=CI --no-build --verbosity normal -s ./test/Blog.Tests/ci.runsettings
|
||||
- name: Upload test results
|
||||
@@ -49,4 +49,4 @@ jobs:
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: playwright-traces
|
||||
path: ./test/Blog.Tests/bin/Debug/net9.0/playwright-traces
|
||||
path: ./test/Blog.Tests/bin/Debug/net10.0/playwright-traces
|
||||
|
||||
Vendored
+1
-1
@@ -22,7 +22,7 @@
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build_blog",
|
||||
"program": "${workspaceFolder}/src/Blog/bin/Debug/net8.0/Blog.dll",
|
||||
"program": "${workspaceFolder}/src/Blog/bin/Debug/net10.0/Blog.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/src/Blog",
|
||||
"stopAtEntry": false,
|
||||
|
||||
Vendored
+1
@@ -3,6 +3,7 @@
|
||||
"Abramov",
|
||||
"Antiforgery",
|
||||
"blazor",
|
||||
"Bunit",
|
||||
"Deets",
|
||||
"Entitize",
|
||||
"Hsts",
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
version: '3.8'
|
||||
name: blog-development
|
||||
services:
|
||||
blog:
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
version: '3.8'
|
||||
name: blog-production
|
||||
services:
|
||||
blog:
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>16b1dba7-29d0-466e-bd34-16d8018898eb</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Markdig" Version="0.40.0" />
|
||||
<PackageReference Include="System.ServiceModel.Syndication" Version="9.0.1" />
|
||||
<PackageReference Include="TestableIO.System.IO.Abstractions.Wrappers" Version="21.2.12" />
|
||||
<PackageReference Include="Markdig" Version="0.43.0" />
|
||||
<PackageReference Include="System.ServiceModel.Syndication" Version="10.0.0" />
|
||||
<PackageReference Include="TestableIO.System.IO.Abstractions.Wrappers" Version="22.0.16" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -31,18 +31,6 @@
|
||||
referrerpolicy="no-referrer-when-downgrade" /></noscript>
|
||||
}
|
||||
<script src="_framework/blazor.web.js"></script>
|
||||
<script>
|
||||
// NOTE: This is a workaround for the issue with FocusOnNavigate in Blazor
|
||||
// not playing nicely with static site generation.
|
||||
// read more here: https://github.com/dotnet/aspnetcore/issues/52412
|
||||
window.Blazor.addEventListener("enhancedload", () => {
|
||||
if (window.location.pathname === "/") {
|
||||
return;
|
||||
}
|
||||
|
||||
window.scroll({ top: 0, left: 0, behavior: 'instant' });
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -5,7 +5,7 @@
|
||||
<NavLink href="/">
|
||||
<h1>journal</h1>
|
||||
<p>using
|
||||
<a href="https://dotnet.microsoft.com/">
|
||||
<a target="_blank" href="https://dotnet.microsoft.com/">
|
||||
.NET @Environment.Version.Major
|
||||
</a>
|
||||
</p>
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS setup-stage
|
||||
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS setup-stage
|
||||
WORKDIR /app
|
||||
COPY *.csproj ./
|
||||
RUN dotnet restore
|
||||
@@ -13,7 +13,7 @@ CMD ["dotnet", "watch"]
|
||||
FROM setup-stage as build-stage
|
||||
RUN dotnet publish -c Release -o dist
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS production-stage
|
||||
FROM mcr.microsoft.com/dotnet/aspnet:10.0 AS production-stage
|
||||
WORKDIR /app
|
||||
COPY --from=build-stage /app/dist ./
|
||||
ENTRYPOINT ["dotnet", "Blog.dll"]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Razor">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<TargetFramework>net10.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
@@ -10,19 +10,19 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="bunit" Version="1.38.5" />
|
||||
<PackageReference Include="bunit" Version="2.1.1" />
|
||||
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="FluentAssertions" Version="7.1.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.1" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
|
||||
<PackageReference Include="Microsoft.Playwright.NUnit" Version="1.49.0" />
|
||||
<PackageReference Include="FluentAssertions" Version="7.2.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="10.0.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
|
||||
<PackageReference Include="Microsoft.Playwright.NUnit" Version="1.56.0" />
|
||||
<PackageReference Include="moq" Version="4.20.72" />
|
||||
<PackageReference Include="NUnit" Version="4.3.2" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="4.6.0" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.6.0" />
|
||||
<PackageReference Include="NUnit" Version="4.4.0" />
|
||||
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0" />
|
||||
<PackageReference Include="NUnit.Analyzers" Version="4.11.2" />
|
||||
<PackageReference Include="coverlet.collector" Version="6.0.4" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
namespace Blog.Tests.EndToEnd;
|
||||
|
||||
[TestFixture]
|
||||
public class BlogTest : PageTest
|
||||
public abstract class BlogTest : PageTest
|
||||
{
|
||||
private readonly BlogHostFactory<Program> _factory = new();
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@inherits Bunit.TestContext
|
||||
@inherits Bunit.BunitContext
|
||||
|
||||
@code
|
||||
{
|
||||
@@ -11,7 +11,7 @@
|
||||
.Setup(x => x.GetPostsAsync())
|
||||
.ReturnsAsync(new List<Post>());
|
||||
|
||||
var ctx = new TestContext();
|
||||
var ctx = new BunitContext();
|
||||
|
||||
ctx.Services.AddSingleton(_postServiceMock.Object);
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
.Setup(x => x.GetPostsAsync())
|
||||
.ReturnsAsync(posts);
|
||||
|
||||
var ctx = new TestContext();
|
||||
var ctx = new BunitContext();
|
||||
|
||||
ctx.Services.AddScoped(_ => _postServiceMock.Object);
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
@inherits Bunit.TestContext
|
||||
@inherits Bunit.BunitContext
|
||||
|
||||
@code
|
||||
{
|
||||
[Test]
|
||||
public void Footer_WhenRendered_ItShouldRenderFooterWithNavLinks()
|
||||
{
|
||||
var ctx = new TestContext();
|
||||
var ctx = new BunitContext();
|
||||
|
||||
var cut = ctx.Render(@<Footer />);
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@inherits Bunit.TestContext
|
||||
@inherits Bunit.BunitContext
|
||||
|
||||
@code
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user