Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for .NET 8 - release-2.3 + suppress CVE-2022-48282 due to breaking change #602

Merged
merged 4 commits into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
workflow_dispatch:
env:
DOTNET_NOLOGO: true
defaults:
run:
shell: pwsh
jobs:
build:
name: ${{ matrix.name }}
Expand All @@ -22,29 +25,30 @@ jobs:
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3.0.3
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: |
8.0.x
7.0.x
6.0.x
- name: Build
run: dotnet build src --configuration Release
- name: Upload packages
if: matrix.name == 'Windows'
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4.3.1
with:
name: NuGet packages
path: nugets/
retention-days: 7
- name: Setup MongoDB Server
uses: Particular/setup-mongodb-action@v1.3.0
uses: Particular/setup-mongodb-action@v1.4.0
with:
connection-string-name: NServiceBusStorageMongoDB_ConnectionString
mongodb-port: 27018
mongodb-replica-set: tr0
- name: Run tests
uses: Particular/run-tests-action@v1.4.0
uses: Particular/run-tests-action@v1.7.0
14 changes: 9 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@ on:
- '[0-9]+.[0-9]+.[0-9]+-*'
env:
DOTNET_NOLOGO: true
defaults:
run:
shell: pwsh
jobs:
release:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3.2.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v3.0.3
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x
- name: Build
run: dotnet build src --configuration Release
- name: Sign NuGet packages
Expand All @@ -28,12 +31,13 @@ jobs:
client-secret: ${{ secrets.AZURE_KEY_VAULT_CLIENT_SECRET }}
certificate-name: ${{ secrets.AZURE_KEY_VAULT_CERTIFICATE_NAME }}
- name: Publish artifacts
uses: actions/upload-artifact@v3.1.1
uses: actions/upload-artifact@v4.3.1
with:
name: nugets
path: nugets/*
retention-days: 1
- name: Deploy
uses: Particular/[email protected]
# Does not follow standard practice of targeting explicit versions because configuration is tightly coupled to Octopus Deploy configuration
uses: Particular/push-octopus-package-action@main
with:
octopus-deploy-api-key: ${{ secrets.OCTOPUS_DEPLOY_API_KEY }}
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net481;net6.0;net7.0;net8.0</TargetFrameworks>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<NoWarn>$(NoWarn);SYSLIB0021</NoWarn>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\NServiceBus.Storage.MongoDB\NServiceBus.Storage.MongoDB.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NServiceBus.AcceptanceTests.Sources" Version="7.8.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="MongoDB.Driver" Version="2.19.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net481;net6.0;net7.0;net8.0</TargetFrameworks>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<NoWarn>$(NoWarn);SYSLIB0021</NoWarn>
<EnableUnsafeBinaryFormatterSerialization>true</EnableUnsafeBinaryFormatterSerialization>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\NServiceBus.Storage.MongoDB\NServiceBus.Storage.MongoDB.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NServiceBus.AcceptanceTests.Sources" Version="7.8.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="MongoDB.Driver" Version="2.19.1" />
</ItemGroup>

Expand Down
3 changes: 3 additions & 0 deletions src/NServiceBus.Storage.MongoDB.Tests/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ dotnet_diagnostic.NSB0004.severity = none
dotnet_diagnostic.NSB0006.severity = none
dotnet_diagnostic.NSB0009.severity = none
dotnet_diagnostic.NSB0012.severity = none

# IDE0028: Simplify collection initialization
dotnet_diagnostic.IDE0028.severity = suggestion
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net481;net6.0;net7.0;net8.0</TargetFrameworks>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

Expand All @@ -10,12 +10,12 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="MongoDB.Driver" Version="2.19.1" />
<PackageReference Include="NServiceBus" Version="7.8.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.4.2" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Particular.Approvals" Version="0.4.1" />
<PackageReference Include="PublicApiGenerator" Version="11.0.0" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net481;net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
<!-- We want the root namespace to match the transactional session one -->
<RootNamespace>NServiceBus.TransactionalSession.AcceptanceTests</RootNamespace>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NServiceBus.AcceptanceTesting" Version="7.8.0" />
<PackageReference Include="NServiceBus.TransactionalSession" Version="1.0.0" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="NUnit" Version="3.14.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="MongoDB.Driver" Version="2.19.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net462;net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net481;net6.0;net7.0;net8.0</TargetFrameworks>
<LangVersion>10.0</LangVersion>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.3.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.2.1" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
<PackageReference Include="Nunit" Version="3.13.3" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<!-- MongoDB.Driver CVE https://github.com/advisories/GHSA-7j9m-j397-g4wx cannot be updated to 2.19.0 without breaking change to target framework -->
<WarningsNotAsErrors>NU1903</WarningsNotAsErrors>
</PropertyGroup>

<ItemGroup>
Expand Down