Skip to content

Commit

Permalink
Update to .NET 8 (#41)
Browse files Browse the repository at this point in the history
* Update to .NET 8

* Update ci.yml

* Update dotnet-tools.json
  • Loading branch information
Kaliumhexacyanoferrat authored Nov 23, 2023
1 parent 37be334 commit 0af6135
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"isRoot": true,
"tools": {
"dotnet-sonarscanner": {
"version": "5.7.2",
"version": "5.14.0",
"commands": [
"dotnet-sonarscanner"
]
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,27 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.305
dotnet-version: 8.0.100
- name: Setup Java JDK
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
java-version: 21
- name: Restore tools
run: dotnet tool restore
- name: Begin scan
if: env.SONAR_TOKEN != null && env.SONAR_TOKEN != ''
run: dotnet sonarscanner begin /k:"Kaliumhexacyanoferrat_MockH" /d:sonar.login="$SONAR_TOKEN" /d:sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*" /o:"kaliumhexacyanoferrat" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.branch.name="${GITHUB_REF##*/}" /d:sonar.dotnet.excludeTestProjects=true
run: dotnet sonarscanner begin /k:"Kaliumhexacyanoferrat_MockH" /d:sonar.token="$SONAR_TOKEN" /d:sonar.cs.opencover.reportsPaths="**/coverage.opencover.xml" /d:sonar.exclusions="**/bin/**/*,**/obj/**/*" /o:"kaliumhexacyanoferrat" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.branch.name="${GITHUB_REF##*/}" /d:sonar.dotnet.excludeTestProjects=true
- name: Build project
run: dotnet build MockH.sln -c Release
- name: Test project
run: dotnet test -c Release --no-build MockH.sln --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover
- name: End scan
if: env.SONAR_TOKEN != null && env.SONAR_TOKEN != ''
run: dotnet sonarscanner end /d:sonar.login="$SONAR_TOKEN"
run: dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN"
6 changes: 3 additions & 3 deletions MockH.Tests/MockH.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>

<TargetFramework>net7.0</TargetFramework>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>

<LangVersion>10.0</LangVersion>
Expand All @@ -15,9 +15,9 @@

<ItemGroup>

<PackageReference Include="GenHTTP.Modules.DirectoryBrowsing" Version="7.0.0" />
<PackageReference Include="GenHTTP.Modules.DirectoryBrowsing" Version="8.0.0" />

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />

<PackageReference Include="MSTest.TestAdapter" Version="3.1.1" />
<PackageReference Include="MSTest.TestFramework" Version="3.1.1" />
Expand Down
8 changes: 4 additions & 4 deletions MockH/MockH.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>

<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>

<LangVersion>10.0</LangVersion>
Expand Down Expand Up @@ -34,11 +34,11 @@

<None Include="..\LICENSE" Pack="true" PackagePath="\" />

<PackageReference Include="GenHTTP.Core" Version="7.0.0" />
<PackageReference Include="GenHTTP.Core" Version="8.0.0" />

<PackageReference Include="GenHTTP.Modules.Functional" Version="7.0.0" />
<PackageReference Include="GenHTTP.Modules.Functional" Version="8.0.0" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.1.1" PrivateAssets="All" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="8.0.0" PrivateAssets="All" />

</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![CI](https://github.com/Kaliumhexacyanoferrat/MockH/actions/workflows/ci.yml/badge.svg)](https://github.com/Kaliumhexacyanoferrat/MockH/actions/workflows/ci.yml) [![Coverage](https://sonarcloud.io/api/project_badges/measure?project=Kaliumhexacyanoferrat_MockH&metric=coverage)](https://sonarcloud.io/summary/new_code?id=Kaliumhexacyanoferrat_MockH) [![nuget Package](https://img.shields.io/nuget/v/MockH.svg)](https://www.nuget.org/packages/MockH/)

This library allows to mock HTTP responses for integration, component and acceptance tests of your projects written in C# / .NET 6/7 by hosting a webserver returning configured responses.
This library allows to mock HTTP responses for integration, component and acceptance tests of your projects written in C# / .NET 6/7/8 by hosting a webserver returning configured responses.

- Fast and thread safe
- Only a few dependencies
Expand Down

0 comments on commit 0af6135

Please sign in to comment.