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

Upgrade PiBox for net8.0 #7

Merged
merged 11 commits into from
Nov 22, 2023
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
12 changes: 0 additions & 12 deletions .config/dotnet-tools.json

This file was deleted.

23 changes: 12 additions & 11 deletions .github/workflows/dotnet-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,36 @@ jobs:
- name: setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'

- name: retrieve version
uses: dotnet/nbgv@master
id: nbgv

- name: install
run: dotnet tool restore && dotnet restore
run: dotnet restore

- name: format
run: dotnet format "./PiBox.sln" --verify-no-changes --no-restore
run: dotnet format --verify-no-changes --no-restore

- name: build
run: dotnet build --no-restore --nologo -c Release

- name: test & cover
run: dotnet dotnet-dotcover test --no-build --no-restore --nologo -c Release --dcReportType=DetailedXML --logger trx --results-directory "./test-results"
- name: build & test & cover
run: dotnet test --collect "Code Coverage;Format=Xml;CoverageFileName=coverage.xml" --results-directory "./test-results" --no-restore --nologo -c Release --logger trx

- name: publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: test-results/**/*.trx
files: |
test-results/**/*.trx

- name: publish coverage results
uses: im-open/code-coverage-report-generator@4
with:
reports: 'dotCover.Output.xml'
reports: '*/**/coverage.xml'
targetdir: './coverage-results'
title: dotnet code coverage
reporttypes: 'MarkdownSummary;'
assemblyfilters: +PiBox*

- name: Create a status check for the code coverage results
id: dotnet-coverage-check
#You may also reference just the major or major.minor version
Expand All @@ -68,11 +67,12 @@ jobs:
ignore-threshold-failures: false # Default: false
line-threshold: 80 # Default: 0, which means thresholds are not applied
branch-threshold: 0 # Default: 0, which means thresholds are not applied

- name: Upload coverage report artifact
uses: actions/upload-artifact@v3
with:
name: Coverage Report
path: coverage-results/**
path: coverage-results/**

- name: Write to Job Summary
run: cat ./coverage-results/Summary.md >> $GITHUB_STEP_SUMMARY
Expand All @@ -85,6 +85,7 @@ jobs:
with:
name: upload artifacts
path: '**/publish/*'

- name: Publish nuget packages
run: dotnet nuget push "**/publish/*.nupkg" -s 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}} --skip-duplicate

22 changes: 11 additions & 11 deletions .github/workflows/dotnet-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,37 +21,36 @@ jobs:
- name: setup
uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
dotnet-version: '8.0.x'

- name: retrieve version
uses: dotnet/nbgv@master
id: nbgv

- name: install
run: dotnet tool restore && dotnet restore
run: dotnet restore

- name: format
run: dotnet format "./PiBox.sln" --verify-no-changes --no-restore
run: dotnet format --verify-no-changes --no-restore

- name: build
run: dotnet build --no-restore --nologo -c Release

- name: test & cover
run: dotnet dotnet-dotcover test --no-build --no-restore --nologo -c Release --dcReportType=DetailedXML --logger trx --results-directory "./test-results"
- name: build & test & cover
run: dotnet test --collect "Code Coverage;Format=Xml;CoverageFileName=coverage.xml" --results-directory "./test-results" --no-restore --nologo -c Release --logger trx

- name: publish test results
uses: EnricoMi/publish-unit-test-result-action@v2
with:
files: test-results/**/*.trx
files: |
test-results/**/*.trx

- name: publish coverage results
uses: im-open/code-coverage-report-generator@4
with:
reports: 'dotCover.Output.xml'
reports: '*/**/coverage.xml'
targetdir: './coverage-results'
title: dotnet code coverage
reporttypes: 'MarkdownSummary;'
assemblyfilters: +PiBox*

- name: Create a status check for the code coverage results
id: dotnet-coverage-check
#You may also reference just the major or major.minor version
Expand All @@ -68,11 +67,12 @@ jobs:
ignore-threshold-failures: false # Default: false
line-threshold: 80 # Default: 0, which means thresholds are not applied
branch-threshold: 0 # Default: 0, which means thresholds are not applied

- name: Upload coverage report artifact
uses: actions/upload-artifact@v3
with:
name: Coverage Report
path: coverage-results/**
lukas-kd marked this conversation as resolved.
Show resolved Hide resolved
path: coverage-results/**

- name: Write to Job Summary
run: cat ./coverage-results/Summary.md >> $GITHUB_STEP_SUMMARY
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
## files generated by popular Visual Studio add-ons.

TestResults/
test-results/
dotCover.Output/
dotCover.Output.html
coverage.xml
Expand All @@ -17,6 +18,7 @@ coverage.xml
*.user
*.userosscache
*.sln.docstates
*.trx

# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
Expand Down
3 changes: 3 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="$(MSBuildProjectName.EndsWith('Generator')) == false AND $(MSBuildProjectName.EndsWith('Example')) == false">
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')">
<PrivateAssets>all</PrivateAssets>
Expand Down
102 changes: 54 additions & 48 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<ManagePackageVersionsCentrally>true</ManagePackageVersionsCentrally>
</PropertyGroup>
<ItemGroup>
<PackageVersion Version="7.0.10" Include="Microsoft.EntityFrameworkCore.Sqlite" />
<PackageVersion Version="8.0.0" Include="Microsoft.EntityFrameworkCore.Sqlite" />
<PackageVersion Version="3.6.133" Include="Nerdbank.GitVersioning" />
<PackageVersion Version="4.3.0" Include="App.Metrics.Abstractions" />
<PackageVersion Version="4.3.0" Include="App.Metrics.AspNetCore.All" />
Expand All @@ -13,69 +13,75 @@
<PackageVersion Version="7.0.0" Include="AspNetCore.HealthChecks.Hangfire" />
<PackageVersion Version="7.0.0" Include="AspNetCore.HealthChecks.MongoDb" />
<PackageVersion Version="5.0.0" Include="AspNetCoreRateLimit" />
<PackageVersion Version="1.9.0" Include="BouncyCastle.NetCore" />
<PackageVersion Version="2.2.1" Include="BouncyCastle.NetCore" />
<PackageVersion Version="2.0.24" Include="Chronos.Abstractions" />
<PackageVersion Version="2.0.24" Include="Chronos.Net" />
<PackageVersion Version="11.7.1" Include="FluentValidation" />
<PackageVersion Version="3.24.2" Include="Google.Protobuf" />
<PackageVersion Version="11.8.1" Include="FluentValidation" />
<PackageVersion Version="3.25.1" Include="Google.Protobuf" />
<PackageVersion Version="2.46.6" Include="Grpc" />
<PackageVersion Version="2.57.0" Include="Grpc.Tools" />
<PackageVersion Version="1.8.5" Include="HangFire" />
<PackageVersion Version="2.59.0" Include="Grpc.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Version="1.8.6" Include="HangFire" />
<PackageVersion Version="1.8.0" Include="Hangfire.MemoryStorage" />
<PackageVersion Version="1.20.2" Include="Hangfire.PostgreSql" />
<PackageVersion Version="2.4.0" Include="KafkaFlow" />
<PackageVersion Version="2.4.0" Include="KafkaFlow.Extensions.Hosting" />
<PackageVersion Version="2.4.0" Include="KafkaFlow.LogHandler.Microsoft" />
<PackageVersion Version="2.4.0" Include="KafkaFlow.Microsoft.DependencyInjection" />
<PackageVersion Version="2.4.0" Include="KafkaFlow.SchemaRegistry" />
<PackageVersion Version="2.4.0" Include="KafkaFlow.Serializer" />
<PackageVersion Version="2.4.0" Include="KafkaFlow.Serializer.ProtobufNet" />
<PackageVersion Version="2.4.0" Include="KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf" />
<PackageVersion Version="2.4.0" Include="KafkaFlow.TypedHandler" />
<PackageVersion Version="1.20.4" Include="Hangfire.PostgreSql" />
<PackageVersion Version="2.5.0" Include="KafkaFlow" />
<PackageVersion Version="2.5.0" Include="KafkaFlow.Extensions.Hosting" />
<PackageVersion Version="2.5.0" Include="KafkaFlow.LogHandler.Microsoft" />
<PackageVersion Version="2.5.0" Include="KafkaFlow.Microsoft.DependencyInjection" />
<PackageVersion Version="2.5.0" Include="KafkaFlow.SchemaRegistry" />
<PackageVersion Version="2.5.0" Include="KafkaFlow.Serializer" />
<PackageVersion Version="2.5.0" Include="KafkaFlow.Serializer.ProtobufNet" />
<PackageVersion Version="2.5.0" Include="KafkaFlow.Serializer.SchemaRegistry.ConfluentProtobuf" />
<PackageVersion Version="2.5.0" Include="KafkaFlow.TypedHandler" />
<PackageVersion Version="3.1.0" Include="NetEscapades.Configuration.Yaml" />
<PackageVersion Version="1.5.0-rc.1" Include="OpenTelemetry.Exporter.Prometheus.AspNetCore" />
<PackageVersion Version="1.5.1" Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" />
<PackageVersion Version="1.6.0" Include="OpenTelemetry.Exporter.OpenTelemetryProtocol" />
<PackageVersion Version="1.0.0-beta.7" Include="OpenTelemetry.Instrumentation.EntityFrameworkCore" />
<PackageVersion Version="1.5.1" Include="OpenTelemetry.Extensions.Hosting" />
<PackageVersion Version="1.6.0" Include="OpenTelemetry.Extensions.Hosting" />
<PackageVersion Version="1.5.0-beta.1" Include="OpenTelemetry.Instrumentation.AspNetCore" />
<PackageVersion Version="1.5.0-beta.1" Include="OpenTelemetry.Instrumentation.Http" />
<PackageVersion Version="1.5.0" Include="OpenTelemetry.Instrumentation.Runtime" />
<PackageVersion Version="1.5.1" Include="OpenTelemetry.Instrumentation.Runtime" />
<PackageVersion Version="0.5.0-beta.3" Include="OpenTelemetry.Instrumentation.Process" />
<PackageVersion Version="7.0.0" Include="Serilog.AspNetCore" />
<PackageVersion Version="8.0.0" Include="Serilog.AspNetCore" />
<PackageVersion Version="3.1.0" Include="Serilog.Enrichers.Span" />
<PackageVersion Version="3.1.0" Include="Serilog.Enrichers.Thread" />
<PackageVersion Version="1.51.91" Include="ODataQueryHelper.Core" />
<PackageVersion Version="4.7.0" Include="Microsoft.CodeAnalysis.CSharp" />
<PackageVersion Version="4.8.0" Include="Microsoft.CodeAnalysis.CSharp" />
<PackageVersion Version="3.3.4" Include="Microsoft.CodeAnalysis.Analyzers" />
<PackageVersion Version="7.0.0" Include="Microsoft.Extensions.Hosting.Abstractions" />
<PackageVersion Version="7.0.1" Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageVersion Version="7.0.0" Include="Microsoft.Extensions.Configuration" />
<PackageVersion Version="7.0.0" Include="Microsoft.Extensions.DependencyInjection" />
<PackageVersion Version="7.0.0" Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<PackageVersion Version="7.0.10" Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" />
<PackageVersion Version="7.0.10" Include="Microsoft.Extensions.Http.Polly" />
<PackageVersion Version="7.0.0" Include="Microsoft.Extensions.Caching.Abstractions" />
<PackageVersion Version="7.0.0" Include="Microsoft.Extensions.Http" />
<PackageVersion Version="8.0.0" Include="Microsoft.Extensions.Hosting.Abstractions" />
<PackageVersion Version="8.0.0" Include="Microsoft.Extensions.Logging.Abstractions" />
<PackageVersion Version="8.0.0" Include="Microsoft.Extensions.Configuration" />
<PackageVersion Version="8.0.0" Include="Microsoft.Extensions.DependencyInjection" />
<PackageVersion Version="8.0.0" Include="Microsoft.Extensions.DependencyInjection.Abstractions" />
<PackageVersion Version="8.0.0" Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" />
<PackageVersion Version="8.0.0" Include="Microsoft.Extensions.Http.Polly" />
<PackageVersion Version="8.0.0" Include="Microsoft.Extensions.Caching.Abstractions" />
<PackageVersion Version="8.0.0" Include="Microsoft.Extensions.Http" />
<PackageVersion Version="3.0.0" Include="Microsoft.FeatureManagement.AspNetCore" />
<PackageVersion Version="7.0.10" Include="Microsoft.EntityFrameworkCore" />
<PackageVersion Version="7.0.10" Include="Microsoft.EntityFrameworkCore.Relational" />
<PackageVersion Version="7.0.10" Include="Microsoft.EntityFrameworkCore.Tools" />
<PackageVersion Version="7.0.10" Include="Microsoft.EntityFrameworkCore.InMemory" />
<PackageVersion Version="7.0.10" Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" />
<PackageVersion Version="8.0.0" Include="Microsoft.EntityFrameworkCore" />
<PackageVersion Version="8.0.0" Include="Microsoft.EntityFrameworkCore.Relational" />
<PackageVersion Version="8.0.0" Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageVersion>
<PackageVersion Version="8.0.0" Include="Microsoft.EntityFrameworkCore.InMemory" />
<PackageVersion Version="8.0.0" Include="Microsoft.AspNetCore.Diagnostics.EntityFrameworkCore" />
<PackageVersion Version="2.2.0" Include="Microsoft.AspNetCore.Hosting.Abstractions" />
<PackageVersion Version="7.0.10" Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
<PackageVersion Version="7.0.10" Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageVersion Version="7.0.10" Include="Microsoft.AspNetCore.Authorization" />
<PackageVersion Version="2.21.0" Include="MongoDB.Driver" />
<PackageVersion Version="8.0.0" Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" />
<PackageVersion Version="8.0.0" Include="Microsoft.AspNetCore.Authorization" />
<PackageVersion Version="2.22.0" Include="MongoDB.Driver" />
<PackageVersion Version="2.2.0" Include="MongoDBMigrations" />
<PackageVersion Version="5.0.0" Include="Minio" />
<PackageVersion Version="6.0.1" Include="Minio" />
<PackageVersion Version="13.0.3" Include="Newtonsoft.Json" />
<PackageVersion Version="6.32.2" Include="Microsoft.IdentityModel.Tokens" />
<PackageVersion Version="6.32.2" Include="System.IdentityModel.Tokens.Jwt" />
<PackageVersion Version="7.0.3" Include="Microsoft.IdentityModel.Tokens" />
<PackageVersion Version="7.0.3" Include="System.IdentityModel.Tokens.Jwt" />
<PackageVersion Version="6.5.0" Include="Swashbuckle.AspNetCore.Annotations" />
<PackageVersion Version="6.5.0" Include="Swashbuckle.AspNetCore.SwaggerUI" />
<PackageVersion Version="4.1.0" Include="jose-jwt" />
<PackageVersion Version="6.0.0" Include="RichardSzalay.MockHttp" />
<PackageVersion Version="7.0.0" Include="RichardSzalay.MockHttp" />
<PackageVersion Version="7.0.4" Include="Npgsql.EntityFrameworkCore.PostgreSQL" />
<PackageVersion Version="1.6.4" Include="Restease" />
<PackageVersion Version="2.13.1" Include="AutoBogus" />
Expand All @@ -84,13 +90,13 @@
<PackageVersion Version="6.12.0" Include="FluentAssertions" />
<PackageVersion Version="17.8.0" Include="Microsoft.NET.Test.Sdk" />
<PackageVersion Version="4.5.0" Include="NUnit3TestAdapter" />
<PackageVersion Version="5.0.0" Include="NSubstitute" />
<PackageVersion Version="5.1.0" Include="NSubstitute" />
<PackageVersion Version="1.0.16" Include="NSubstitute.Analyzers.CSharp" />
<PackageVersion Version="3.13.3" Include="NUnit" />
<PackageVersion Version="3.14.0" Include="NUnit" />
<PackageVersion Version="1.2.1.1" Include="NUnit.Allure" />
<PackageVersion Version="3.4.1" Include="Unleash.Client" />
<PackageVersion Version="3.0.21" Include="Vogen" />
<PackageVersion Version="1.5.35" Include="WireMock.Net" />
<PackageVersion Version="4.0.0" Include="Unleash.Client" />
<PackageVersion Version="3.0.23" Include="Vogen" />
<PackageVersion Version="1.5.40" Include="WireMock.Net" />
<PackageVersion Version="13.7.1" Include="YamlDotNet" />
</ItemGroup>
</Project>
</Project>
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>

<Nullable>disable</Nullable><ImplicitUsings>enable</ImplicitUsings>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

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

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>disable</Nullable><ImplicitUsings>enable</ImplicitUsings>
<DocumentationFile>PiBox.Api.OpenApi.xml</DocumentationFile>
<Nullable>disable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<DocumentationFile>PiBox.Api.OpenApi.xml</DocumentationFile>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading