Skip to content

Commit 486a6c0

Browse files
committed
Updates project to .NET 10 and latest dependencies
Updates target framework to .NET 10.0 and upgrades dependency versions, including Foundatio.Xunit, MinVer, and Microsoft.SourceLink.GitHub. Adds new workflow for CodeQL analysis and Copilot setup steps. Configures a new test runner. The copyright is updated to reflect the current year.
1 parent 14365ea commit 486a6c0

28 files changed

Lines changed: 87 additions & 41 deletions

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ jobs:
66
uses: FoundatioFx/Foundatio/.github/workflows/build-workflow.yml@main
77
with:
88
org: exceptionless
9+
new-test-runner: true
910
secrets:
1011
NUGET_KEY: ${{ secrets.NUGET_KEY }}
1112
FEEDZ_KEY: ${{ secrets.FEEDZ_KEY }}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: "Code scanning - action"
2+
3+
on:
4+
schedule:
5+
- cron: '0 1 * * 2'
6+
7+
jobs:
8+
CodeQL-Build:
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v6
15+
with:
16+
# We must fetch at least the immediate parents so that if this is
17+
# a pull request then we can checkout the head.
18+
fetch-depth: 2
19+
20+
# If this run was triggered by a pull request event, then checkout
21+
# the head of the pull request instead of the merge commit.
22+
- run: git checkout HEAD^2
23+
if: ${{ github.event_name == 'pull_request' }}
24+
25+
- name: Initialize CodeQL
26+
uses: github/codeql-action/init@v4
27+
with:
28+
languages: csharp
29+
30+
- name: Setup .NET Core
31+
uses: actions/setup-dotnet@v5
32+
with:
33+
dotnet-version: 10.0.x
34+
35+
- name: Build
36+
run: dotnet build Exceptionless.DateTimeExtensions.slnx --configuration Release
37+
38+
- name: Perform CodeQL Analysis
39+
uses: github/codeql-action/analyze@v4
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: "Copilot Setup"
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- .github/workflows/copilot-setup-steps.yml
8+
pull_request:
9+
paths:
10+
- .github/workflows/copilot-setup-steps.yml
11+
12+
jobs:
13+
copilot-setup-steps:
14+
runs-on: ubuntu-latest
15+
16+
permissions:
17+
contents: read
18+
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v6
22+
23+
- name: Setup .NET Core
24+
uses: actions/setup-dotnet@v5
25+
with:
26+
dotnet-version: 10.0.x

build/common.props

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>
1111
<MinVerTagPrefix>v</MinVerTagPrefix>
1212

13-
<Copyright>Copyright (c) 2025 Exceptionless. All rights reserved.</Copyright>
13+
<Copyright>Copyright © $([System.DateTime]::Now.ToString(yyyy)) Exceptionless. All rights reserved.</Copyright>
1414
<Authors>Exceptionless</Authors>
1515
<NoWarn>$(NoWarn);CS1591;NU1701</NoWarn>
1616
<WarningsAsErrors>true</WarningsAsErrors>
@@ -31,9 +31,9 @@
3131
</PropertyGroup>
3232

3333
<ItemGroup>
34-
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All"/>
34+
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="10.0.103" PrivateAssets="All"/>
3535
<PackageReference Include="AsyncFixer" Version="2.1.0" PrivateAssets="All" />
36-
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="All" />
36+
<PackageReference Include="MinVer" Version="7.0.0" PrivateAssets="All" />
3737
</ItemGroup>
3838

3939
<ItemGroup>

global.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"test": {
3+
"runner": "Microsoft.Testing.Platform"
4+
}
5+
}

tests/Exceptionless.DateTimeExtensions.Tests/DateMathTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Foundatio.Xunit;
33
using Microsoft.Extensions.Logging;
44
using Xunit;
5-
using Xunit.Abstractions;
65

76
namespace Exceptionless.DateTimeExtensions.Tests;
87

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<Import Project="..\..\build\common.props" />
33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net10.0</TargetFramework>
5+
<OutputType>Exe</OutputType>
56
<IsPackable>False</IsPackable>
7+
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
68
</PropertyGroup>
79
<ItemGroup>
810
<ProjectReference Include="..\..\src\Exceptionless.DateTimeExtensions\Exceptionless.DateTimeExtensions.csproj" />
911
</ItemGroup>
1012
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
12-
<PackageReference Include="xunit" Version="2.9.3" />
13-
<PackageReference Include="xunit.runner.visualstudio" Version="3.1.5">
14-
<PrivateAssets>all</PrivateAssets>
15-
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16-
</PackageReference>
17-
<PackageReference Include="Foundatio.Xunit" Version="12.0.0" />
13+
<PackageReference Include="xunit.v3.mtp-v2" Version="3.2.2" />
14+
<PackageReference Include="Foundatio.Xunit.v3" Version="13.0.0-beta1" />
1815
<PackageReference Include="GitHubActionsTestLogger" Version="3.0.1" PrivateAssets="All" />
1916
</ItemGroup>
2017
</Project>

tests/Exceptionless.DateTimeExtensions.Tests/FormatParsers/ExplicitDateFormatParserTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Collections.Generic;
33
using Exceptionless.DateTimeExtensions.FormatParsers;
44
using Xunit;
5-
using Xunit.Abstractions;
65

76
namespace Exceptionless.DateTimeExtensions.Tests.FormatParsers;
87

tests/Exceptionless.DateTimeExtensions.Tests/FormatParsers/FormatParserTestsBase.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
using System;
1+
using System;
22
using Exceptionless.DateTimeExtensions.FormatParsers;
33
using Foundatio.Xunit;
44
using Microsoft.Extensions.Logging;
55
using Xunit;
6-
using Xunit.Abstractions;
76

87
namespace Exceptionless.DateTimeExtensions.Tests.FormatParsers;
98

tests/Exceptionless.DateTimeExtensions.Tests/FormatParsers/MonthDayFormatParserTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using System.Collections.Generic;
33
using Exceptionless.DateTimeExtensions.FormatParsers;
44
using Xunit;
5-
using Xunit.Abstractions;
65

76
namespace Exceptionless.DateTimeExtensions.Tests.FormatParsers;
87

0 commit comments

Comments
 (0)