Skip to content

Commit 4e4f1ad

Browse files
authored
feat: update net9 (#2608)
* feat: update net9 * feat: update ci * feat: update azure * feat: update db
1 parent 0908fbc commit 4e4f1ad

File tree

7 files changed

+16
-16
lines changed

7 files changed

+16
-16
lines changed

.github/workflows/build-and-dockerize.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
# Label used to access the service container
1414
postgres:
1515
# Docker Hub image
16-
image: postgres:15-alpine
16+
image: postgres:17-alpine
1717
ports:
1818
- 5432:5432
1919
# Provide the password for postgres
@@ -32,13 +32,13 @@ jobs:
3232
- 10000:10000
3333
- 10001:10001
3434
- 10002:10002
35-
runs-on: ubuntu-22.04
35+
runs-on: ubuntu-24.04
3636
steps:
3737
- uses: actions/checkout@v4
3838
- name: Setup .NET Core
3939
uses: actions/setup-dotnet@v4
4040
with:
41-
dotnet-version: '8.0.x'
41+
dotnet-version: '9.0.x'
4242
dotnet-quality: 'preview'
4343
- name: Install dependencies
4444
run: dotnet restore

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
actions: read
1515
contents: read
1616
security-events: write
17-
runs-on: ubuntu-22.04
17+
runs-on: ubuntu-24.04
1818
steps:
1919
- uses: actions/checkout@v4
2020
- name: Initialize CodeQL
@@ -24,7 +24,7 @@ jobs:
2424
- name: Setup .NET Core
2525
uses: actions/setup-dotnet@v4
2626
with:
27-
dotnet-version: '8.0.x'
27+
dotnet-version: '9.0.x'
2828
dotnet-quality: 'preview'
2929
- name: Autobuild
3030
uses: github/codeql-action/autobuild@v3

.github/workflows/docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env:
1010
IMAGE_NAME: netcoreboilerplate
1111
jobs:
1212
build-docker-test:
13-
runs-on: ubuntu-22.04
13+
runs-on: ubuntu-24.04
1414
if: github.event_name == 'pull_request'
1515
steps:
1616
- uses: actions/checkout@v4
@@ -32,7 +32,7 @@ jobs:
3232
with:
3333
sarif_file: 'trivy-results.sarif'
3434
build-push-docker:
35-
runs-on: ubuntu-22.04
35+
runs-on: ubuntu-24.04
3636
if: github.event_name == 'push'
3737
steps:
3838
- uses: actions/checkout@v4

BervProject.WebApi.Boilerplate/BervProject.WebApi.Boilerplate.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk.Web">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<RootNamespace>BervProject.WebApi.Boilerplate</RootNamespace>
66
</PropertyGroup>
77

@@ -31,15 +31,15 @@
3131
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
3232
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="5.1.0" />
3333
<PackageReference Include="Microsoft.Azure.ServiceBus" Version="5.2.0" />
34-
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.10">
34+
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="9.0.0">
3535
<PrivateAssets>all</PrivateAssets>
3636
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
3737
</PackageReference>
3838
<PackageReference Include="Microsoft.Extensions.Azure" Version="1.9.0" />
3939
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="9.0.0" />
4040
<PackageReference Include="NLog" Version="5.3.4" />
4141
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.15" />
42-
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="8.0.10" />
42+
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="9.0.1" />
4343
<PackageReference Include="Swashbuckle.AspNetCore" Version="7.1.0" />
4444
</ItemGroup>
4545

BervProject.WebApi.Integration.Test/BervProject.WebApi.Integration.Test.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<ImplicitUsings>enable</ImplicitUsings>
66
<Nullable>enable</Nullable>
77

88
<IsPackable>false</IsPackable>
99
</PropertyGroup>
1010

1111
<ItemGroup>
12-
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.11" />
12+
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="9.0.0" />
1313
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
1414
<PackageReference Include="xunit" Version="2.9.2" />
1515
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">

BervProject.WebApi.Test/BervProject.WebApi.Test.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55

66
<IsPackable>false</IsPackable>
77
</PropertyGroup>

azure-pipelines.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ trigger:
99
- main
1010

1111
pool:
12-
vmImage: 'ubuntu-22.04'
12+
vmImage: 'ubuntu-24.04'
1313

1414
resources:
1515
containers:
1616
- container: postgres
17-
image: postgres:15-alpine
17+
image: postgres:17-alpine
1818
env:
1919
POSTGRES_PASSWORD: postgres
2020
POSTGRES_DB: testdb
@@ -30,7 +30,7 @@ resources:
3030
variables:
3131
buildConfiguration: 'Release'
3232
imageName: 'berviantoleo/net-core-boilerplate'
33-
dotnetSdkVersion: '8.0.x'
33+
dotnetSdkVersion: '9.0.x'
3434
postgresConnectionString: 'Host=localhost;Database=testdb;Username=postgres;Password=postgres'
3535

3636
jobs:

0 commit comments

Comments
 (0)