diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index c429047..5f00d01 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -16,7 +16,7 @@ jobs: CONFIGURATION: Release services: mongo: - image: mongo:5.0 + image: mongo:7.0 options: --hostname "mongo_db" ports: - 27017:27017 @@ -33,6 +33,7 @@ jobs: 6.x 7.x 8.x + 9.x - name: Set up JDK 11 uses: actions/setup-java@v4 diff --git a/.github/workflows/Publish packages.yml b/.github/workflows/Publish packages.yml index c08c78f..1ad1168 100644 --- a/.github/workflows/Publish packages.yml +++ b/.github/workflows/Publish packages.yml @@ -1,37 +1,38 @@ name: Publish packages on: - workflow_dispatch: + workflow_dispatch: jobs: - publish: - name: Publish NuGet packages - runs-on: ubuntu-latest - env: - NUGET_KEY: ${{ secrets.NUGET_KEY }} - CONFIGURATION: Release - PACKAGES_DIRECTORY: ./packages - NUGET_SOURCE: https://api.nuget.org/v3/index.json - - steps: - - uses: actions/checkout@v4 - - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: | - 6.x - 7.x - 8.x - - - name: Restore dependencies - run: dotnet restore - - - name: Build - run: dotnet build --no-restore --configuration "${{ env.CONFIGURATION }}" - - - name: Pack 'Clean tests' - run: dotnet pack --no-build --configuration "${{ env.CONFIGURATION }}" ./TryAtSoftware.CleanTests.Core/TryAtSoftware.CleanTests.Core.csproj -o "${{ env.PACKAGES_DIRECTORY }}" - - - name: Publish all packages - run: dotnet nuget push "${{ env.PACKAGES_DIRECTORY }}/*.nupkg" --source "${{ env.NUGET_SOURCE }}" --api-key "${{ env.NUGET_KEY }}" --skip-duplicate + publish: + name: Publish NuGet packages + runs-on: ubuntu-latest + env: + NUGET_KEY: ${{ secrets.NUGET_KEY }} + CONFIGURATION: Release + PACKAGES_DIRECTORY: ./packages + NUGET_SOURCE: https://api.nuget.org/v3/index.json + + steps: + - uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: | + 6.x + 7.x + 8.x + 9.x + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --no-restore --configuration "${{ env.CONFIGURATION }}" + + - name: Pack 'Clean tests' + run: dotnet pack --no-build --configuration "${{ env.CONFIGURATION }}" ./TryAtSoftware.CleanTests.Core/TryAtSoftware.CleanTests.Core.csproj -o "${{ env.PACKAGES_DIRECTORY }}" + + - name: Publish all packages + run: dotnet nuget push "${{ env.PACKAGES_DIRECTORY }}/*.nupkg" --source "${{ env.NUGET_SOURCE }}" --api-key "${{ env.NUGET_KEY }}" --skip-duplicate diff --git a/Samples/Calculator/Calculator.API/Calculator.API.csproj b/Samples/Calculator/Calculator.API/Calculator.API.csproj index 307bd1c..f898263 100644 --- a/Samples/Calculator/Calculator.API/Calculator.API.csproj +++ b/Samples/Calculator/Calculator.API/Calculator.API.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable diff --git a/Samples/Calculator/Calculator.CleanTests/Calculator.CleanTests.csproj b/Samples/Calculator/Calculator.CleanTests/Calculator.CleanTests.csproj index c989478..fad0f57 100644 --- a/Samples/Calculator/Calculator.CleanTests/Calculator.CleanTests.csproj +++ b/Samples/Calculator/Calculator.CleanTests/Calculator.CleanTests.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable @@ -10,20 +10,20 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/Samples/Job Agency/JobAgency.CleanTests/JobAgency.CleanTests.csproj b/Samples/Job Agency/JobAgency.CleanTests/JobAgency.CleanTests.csproj index 27b7f03..496f75f 100644 --- a/Samples/Job Agency/JobAgency.CleanTests/JobAgency.CleanTests.csproj +++ b/Samples/Job Agency/JobAgency.CleanTests/JobAgency.CleanTests.csproj @@ -1,26 +1,26 @@ - net8.0 + net9.0 enable false - + all runtime; build; native; contentfiles; analyzers; buildtransitive - + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/Samples/Job Agency/JobAgency.Data/Configuration/MongoDbEntitiesConfiguration.cs b/Samples/Job Agency/JobAgency.Data/Configuration/MongoDbEntitiesConfiguration.cs index 9bb2794..21dcf66 100644 --- a/Samples/Job Agency/JobAgency.Data/Configuration/MongoDbEntitiesConfiguration.cs +++ b/Samples/Job Agency/JobAgency.Data/Configuration/MongoDbEntitiesConfiguration.cs @@ -4,6 +4,7 @@ using JobAgency.Models.Benefits; using JobAgency.Models.Interfaces; using JobAgency.Models.Requirements; +using MongoDB.Bson; using MongoDB.Bson.Serialization; using MongoDB.Bson.Serialization.Serializers; @@ -20,6 +21,8 @@ public static void Apply() _isApplied = true; } + BsonSerializer.RegisterSerializer(new GuidSerializer(GuidRepresentation.Standard)); + BsonClassMap.RegisterClassMap( x => { diff --git a/Samples/Job Agency/JobAgency.Data/JobAgency.Data.csproj b/Samples/Job Agency/JobAgency.Data/JobAgency.Data.csproj index f70e5d6..541d2dc 100644 --- a/Samples/Job Agency/JobAgency.Data/JobAgency.Data.csproj +++ b/Samples/Job Agency/JobAgency.Data/JobAgency.Data.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable @@ -10,8 +10,8 @@ - - + + diff --git a/Samples/Job Agency/JobAgency.Models/JobAgency.Models.csproj b/Samples/Job Agency/JobAgency.Models/JobAgency.Models.csproj index 27dae03..bfa5e14 100644 --- a/Samples/Job Agency/JobAgency.Models/JobAgency.Models.csproj +++ b/Samples/Job Agency/JobAgency.Models/JobAgency.Models.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable diff --git a/Samples/Job Agency/docker-compose.yml b/Samples/Job Agency/docker-compose.yml index e2fa7e1..c63a429 100644 --- a/Samples/Job Agency/docker-compose.yml +++ b/Samples/Job Agency/docker-compose.yml @@ -1,6 +1,6 @@ services: mongo: - image: mongo:5.0 + image: mongo:7.0 container_name: ja_mongo hostname: mongo_db volumes: diff --git a/Tests/TryAtSoftware.CleanTests.Benchmark/TryAtSoftware.CleanTests.Benchmark.csproj b/Tests/TryAtSoftware.CleanTests.Benchmark/TryAtSoftware.CleanTests.Benchmark.csproj index 2eefd59..84f392a 100644 --- a/Tests/TryAtSoftware.CleanTests.Benchmark/TryAtSoftware.CleanTests.Benchmark.csproj +++ b/Tests/TryAtSoftware.CleanTests.Benchmark/TryAtSoftware.CleanTests.Benchmark.csproj @@ -1,12 +1,12 @@ - net8.0 + net9.0 Exe - + diff --git a/Tests/TryAtSoftware.CleanTests.UnitTests/TryAtSoftware.CleanTests.UnitTests.csproj b/Tests/TryAtSoftware.CleanTests.UnitTests/TryAtSoftware.CleanTests.UnitTests.csproj index 4204d51..0199507 100644 --- a/Tests/TryAtSoftware.CleanTests.UnitTests/TryAtSoftware.CleanTests.UnitTests.csproj +++ b/Tests/TryAtSoftware.CleanTests.UnitTests/TryAtSoftware.CleanTests.UnitTests.csproj @@ -1,7 +1,7 @@ - net6.0;net7.0;net8.0 + net6.0;net7.0;net8.0;net9.0 latest enable enable @@ -14,26 +14,26 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - + + - - + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all - + diff --git a/TryAtSoftware.CleanTests.Core/TryAtSoftware.CleanTests.Core.csproj b/TryAtSoftware.CleanTests.Core/TryAtSoftware.CleanTests.Core.csproj index 1b7003a..9538d1a 100644 --- a/TryAtSoftware.CleanTests.Core/TryAtSoftware.CleanTests.Core.csproj +++ b/TryAtSoftware.CleanTests.Core/TryAtSoftware.CleanTests.Core.csproj @@ -1,7 +1,7 @@ - netstandard2.1;net6.0;net7.0;net8.0 + netstandard2.1;net6.0;net7.0;net8.0;net9.0 latest enable false @@ -25,7 +25,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -35,7 +35,7 @@ - + @@ -46,7 +46,12 @@ - + + + + + + diff --git a/TryAtSoftware.CleanTests.Sample/TryAtSoftware.CleanTests.Sample.csproj b/TryAtSoftware.CleanTests.Sample/TryAtSoftware.CleanTests.Sample.csproj index 593c21c..4b529c1 100644 --- a/TryAtSoftware.CleanTests.Sample/TryAtSoftware.CleanTests.Sample.csproj +++ b/TryAtSoftware.CleanTests.Sample/TryAtSoftware.CleanTests.Sample.csproj @@ -1,7 +1,7 @@ - net8.0 + net9.0 enable enable @@ -9,17 +9,17 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all