Skip to content

Commit

Permalink
Merge pull request #11 from managedcode/update_to_dotnet8
Browse files Browse the repository at this point in the history
Update to .net8
  • Loading branch information
TRybina132 authored Nov 29, 2023
2 parents e26d807 + c6db0d6 commit 8aa8da7
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 24 deletions.
37 changes: 36 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,46 @@ jobs:
# run build and test
- name: Restore dependencies
run: dotnet restore

- name: Build
run: dotnet build --no-restore

- name: Test and Collect Code Coverage
run: dotnet test -p:CollectCoverage=true -p:CoverletOutput=coverage/


- name: Copy coverage files
run: |
mkdir '${{ github.workspace }}/coverage'
find . -name "*.opencover.xml" -exec sh -c 'cp "$0" "coverage/coverage-$(basename $0)"' {} \;
- name: List coverage files
run: ls '${{ github.workspace }}/coverage/'

- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=managedcode
-Dsonar.projectKey=managedcode_Communication
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
-Dsonar.cs.opencover.reportsPaths=${{ github.workspace }}/coverage/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: NDepend
uses: ndepend/ndepend-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
license: ${{ secrets.NDEPENDLICENSE }}
coveragefolder: ${{ github.workspace }}/coverage/
baseline: main_recent
retention-days: 15

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

# - name: coveralls
# uses: coverallsapp/github-action@master
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
<RepositoryUrl>https://github.com/managedcode/Communication</RepositoryUrl>
<PackageProjectUrl>https://github.com/managedcode/Communication</PackageProjectUrl>
<Product>Managed Code - Communication</Product>
<Version>2.0.26</Version>
<PackageVersion>2.0.26</PackageVersion>
<Version>8.0.0</Version>
<PackageVersion>8.0.0</PackageVersion>

</PropertyGroup>
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" Version="0.13.6" />
<PackageReference Include="BenchmarkDotNet" Version="0.13.10" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<LangVersion>11</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<TargetFrameworks>net6.0;net7.0;</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
<RootNamespace>ManagedCode.Communication.Extensions</RootNamespace>
<OutputType>Library</OutputType>
</PropertyGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<LangVersion>11</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>ManagedCode.Communication</RootNamespace>
<TargetFrameworks>net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

<!--NuGet-->
Expand All @@ -17,9 +17,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Orleans.Sdk" Version="7.2.1" />
<PackageReference Include="Microsoft.Orleans.Runtime" Version="7.2.1" />
<PackageReference Include="Microsoft.Orleans.Serialization.Abstractions" Version="7.2.1" />
<PackageReference Include="Microsoft.Orleans.Sdk" Version="7.2.3" />
<PackageReference Include="Microsoft.Orleans.Runtime" Version="7.2.3" />
<PackageReference Include="Microsoft.Orleans.Serialization.Abstractions" Version="7.2.3" />
</ItemGroup>

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

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<EnableNETAnalyzers>true</EnableNETAnalyzers>
<IsPackable>false</IsPackable>
<LangVersion>11</LangVersion>
<Nullable>enable</Nullable>
<OutputType>Library</OutputType>
<GenerateProgramFile>false</GenerateProgramFile>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup>
<VSTestLogger>trx%3bLogFileName=$(MSBuildProjectName).trx</VSTestLogger>
Expand All @@ -26,17 +26,17 @@
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Orleans.TestingHost" Version="7.2.1" />
<PackageReference Include="FluentAssertions" Version="6.11.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="7.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.6.3" />
<PackageReference Include="Microsoft.Orleans.TestingHost" Version="7.2.3" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="System.Text.Json" Version="7.0.3" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="7.0.9" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="7.0.9" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="7.0.9" />
<PackageReference Include="xunit" Version="2.5.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.0">
<PackageReference Include="System.Text.Json" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Testing" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.SignalR.Client" Version="8.0.0" />
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="8.0.0" />
<PackageReference Include="xunit" Version="2.6.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.4">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
6 changes: 3 additions & 3 deletions ManagedCode.Communication/ManagedCode.Communication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<LangVersion>11</LangVersion>
<Nullable>enable</Nullable>
<IsPackable>true</IsPackable>
<TargetFrameworks>net6.0;net7.0;</TargetFrameworks>
<TargetFrameworks>net6.0;net7.0;net8.0</TargetFrameworks>
</PropertyGroup>

<!--NuGet-->
Expand All @@ -15,8 +15,8 @@
<PackageTags>managedcode, Communication, Result</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Logging" Version="7.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="7.0.1" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.0" />
</ItemGroup>
<ItemGroup>
<InternalsVisibleTo Include="ManagedCode.Communication.Orleans" />
Expand Down

0 comments on commit 8aa8da7

Please sign in to comment.