diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 997f3ba1..db2a1a77 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,16 +5,19 @@ on: branches: - master pull_request: - branches: - - master +env: + DOTNET_NOLOGO: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + MINVERBUILDMETADATA: build.${{ github.run_id }}.${{ github.run_attempt}} jobs: build: runs-on: windows-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v4.2.0 with: fetch-depth: 0 + filter: tree:0 - name: Setup dotnet uses: actions/setup-dotnet@v4 with: @@ -25,6 +28,7 @@ jobs: run: ./Build.ps1 shell: pwsh - name: Push to MyGet + if: github.ref == 'refs/heads/master' env: NUGET_URL: https://f.feedz.io/lucky-penny-software/mediatr/nuget/index.json NUGET_API_KEY: ${{ secrets.FEEDZIO_ACCESS_TOKEN }} diff --git a/.github/workflows/devskim.yml b/.github/workflows/devskim.yml deleted file mode 100644 index f982b6d7..00000000 --- a/.github/workflows/devskim.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -name: DevSkim - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - schedule: - - cron: '25 3 * * 0' - -jobs: - lint: - name: DevSkim - runs-on: ubuntu-20.04 - permissions: - actions: read - contents: read - security-events: write - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Run DevSkim scanner - uses: microsoft/DevSkim-Action@v1 - - - name: Upload DevSkim scan results to GitHub Security tab - uses: github/codeql-action/upload-sarif@v2 - with: - sarif_file: devskim-results.sarif diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f021ebfb..2bd9ab63 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,10 @@ on: push: tags: - '*.*.*' +env: + DOTNET_NOLOGO: true + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true + MINVERBUILDMETADATA: build.${{ github.run_id }}.${{ github.run_attempt}} jobs: build: strategy: @@ -16,6 +20,7 @@ jobs: uses: actions/checkout@v4 with: fetch-depth: 0 + filter: tree:0 - name: Setup dotnet uses: actions/setup-dotnet@v4 with: diff --git a/Directory.Build.props b/Directory.Build.props index 2825fa0a..b78d0256 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,9 @@ - 10.0 + $([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::get_OSX()))) + $([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::get_Windows()))) + + 13.0 $(NoWarn);CS1701;CS1702;CS1591 true diff --git a/src/MediatR/MediatR.csproj b/src/MediatR/MediatR.csproj index ef9af93f..00d99c9d 100644 --- a/src/MediatR/MediatR.csproj +++ b/src/MediatR/MediatR.csproj @@ -25,6 +25,10 @@ true + + $(TargetFrameworks);net462 + + @@ -45,7 +49,7 @@ - + diff --git a/src/MediatR/MicrosoftExtensionsDI/MediatRServiceCollectionExtensions.cs b/src/MediatR/MicrosoftExtensionsDI/MediatRServiceCollectionExtensions.cs index c6982473..13a0fc76 100644 --- a/src/MediatR/MicrosoftExtensionsDI/MediatRServiceCollectionExtensions.cs +++ b/src/MediatR/MicrosoftExtensionsDI/MediatRServiceCollectionExtensions.cs @@ -5,7 +5,6 @@ using MediatR.Pipeline; using MediatR.Registration; using Microsoft.Extensions.Logging; -using Microsoft.Extensions.Options; namespace Microsoft.Extensions.DependencyInjection; diff --git a/test/MediatR.Tests/GenericRequestHandlerTests.cs b/test/MediatR.Tests/GenericRequestHandlerTests.cs index 18767f71..2276cd6e 100644 --- a/test/MediatR.Tests/GenericRequestHandlerTests.cs +++ b/test/MediatR.Tests/GenericRequestHandlerTests.cs @@ -3,6 +3,7 @@ namespace MediatR.Tests { + [Collection(nameof(ServiceFactoryCollectionBehavior))] public class GenericRequestHandlerTests : BaseGenericRequestHandlerTests { diff --git a/test/MediatR.Tests/MediatR.Tests.csproj b/test/MediatR.Tests/MediatR.Tests.csproj index 4ac61f57..5cb7c3c3 100644 --- a/test/MediatR.Tests/MediatR.Tests.csproj +++ b/test/MediatR.Tests/MediatR.Tests.csproj @@ -1,8 +1,7 @@  - net9.0 - net481;net9.0 + net9.0 enable $(NoWarn);CS8002; false @@ -10,6 +9,10 @@ ..\..\MediatR.snk + + $(TargetFrameworks);net462 + +