Skip to content

Commit

Permalink
Enable strong name signing, bump sdk (#355)
Browse files Browse the repository at this point in the history
* enable strong name signing, bump sdk

* strong name tests, fix InternalsVisibleTo attribute to allow tests to build

* add SolutionDir parameter to tests

* try fix docfx project loading issue

* add missing metadata property to docfx
  • Loading branch information
ozangoktan authored Jan 5, 2024
1 parent 2ef7238 commit 5992431
Show file tree
Hide file tree
Showing 12 changed files with 28 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
- name: Build
run: dotnet build --configuration Debug --no-restore
- name: Unit Test
run: dotnet test --no-restore --verbosity normal /p:Exclude="[*.Test]*" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=TestResults/ --filter ExtractorUtils.Test.Unit. ./ExtractorUtils.Test/
run: dotnet test --no-restore --verbosity normal /p:Exclude="[*.Test]*" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=TestResults/ /p:SolutionDir=$(pwd) --filter ExtractorUtils.Test.Unit. ./ExtractorUtils.Test/
if: ${{ github.event == 'pull_request' && github.base_ref == 'refs/heads/integration' }}
- name: Start Redis
uses: supercharge/redis-github-action@ea9b21c6ecece47bd99595c532e481390ea0f044 # 1.8.0
with:
redis-version: 5
- name: Test
run: dotnet test --no-restore --verbosity normal /p:Exclude="[*.Test]*" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=TestResults/ ./ExtractorUtils.Test/
run: dotnet test --no-restore --verbosity normal /p:Exclude="[*.Test]*" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover /p:CoverletOutput=TestResults/ /p:SolutionDir=$(pwd) ./ExtractorUtils.Test/
if: ${{ github.event != 'pull_request' || github.base_ref == 'refs/heads/master' }}
env:
TEST_PROJECT: "extractor-tests"
Expand Down
3 changes: 2 additions & 1 deletion Cognite.Common/Cognite.Common.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AssemblyOriginatorKeyFile>$(SolutionDir)/strong_name.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE" Pack="true" Visible="false" PackagePath="" />
Expand All @@ -28,4 +29,4 @@
<PackageReference Include="NCrontab.Signed" Version="3.3.3" />
</ItemGroup>

</Project>
</Project>
3 changes: 2 additions & 1 deletion Cognite.Config/Cognite.Configuration.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AssemblyOriginatorKeyFile>$(SolutionDir)/strong_name.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE" Pack="true" Visible="false" PackagePath="" />
Expand All @@ -33,4 +34,4 @@
<ProjectReference Include="..\Cognite.Common\Cognite.Common.csproj" />
</ItemGroup>

</Project>
</Project>
3 changes: 2 additions & 1 deletion Cognite.Extensions/Cognite.Extensions.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AssemblyOriginatorKeyFile>$(SolutionDir)/strong_name.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE" Pack="true" Visible="false" PackagePath="" />
Expand All @@ -27,7 +28,7 @@
<ItemGroup>
<PackageReference Include="Microsoft.Identity.Client" Version="4.58.1" />
<PackageReference Include="System.Text.Json" Version="8.0.0" />
<PackageReference Include="CogniteSdk" Version="3.16.1" />
<PackageReference Include="CogniteSdk" Version="3.16.2" />
<PackageReference Include="prometheus-net" Version="8.2.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="8.0.0" />
Expand Down
1 change: 1 addition & 0 deletions Cognite.Logging/Cognite.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AssemblyOriginatorKeyFile>$(SolutionDir)/strong_name.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE" Pack="true" Visible="false" PackagePath="" />
Expand Down
3 changes: 2 additions & 1 deletion Cognite.Metrics/Cognite.Metrics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AssemblyOriginatorKeyFile>$(SolutionDir)/strong_name.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE" Pack="true" Visible="false" PackagePath="" />
Expand All @@ -35,4 +36,4 @@
<ProjectReference Include="..\Cognite.Common\Cognite.Common.csproj" />
</ItemGroup>

</Project>
</Project>
3 changes: 2 additions & 1 deletion Cognite.StateStorage/Cognite.StateStorage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AssemblyOriginatorKeyFile>$(SolutionDir)/strong_name.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE" Pack="true" Visible="false" PackagePath="" />
Expand All @@ -31,4 +32,4 @@
<ProjectReference Include="..\Cognite.Common\Cognite.Common.csproj" />
<ProjectReference Include="..\Cognite.Metrics\Cognite.Metrics.csproj" />
</ItemGroup>
</Project>
</Project>
5 changes: 3 additions & 2 deletions Cognite.Testing/Cognite.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,13 @@
<IsPackable>true</IsPackable>
<IsTestProject>false</IsTestProject>
<AssemblyOriginatorKeyFile>$(SolutionDir)/strong_name.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
</PropertyGroup>

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

<ItemGroup>
<PackageReference Include="xunit.assert" Version="2.6.4" />
<PackageReference Include="xunit.core" Version="2.6.4" />
Expand All @@ -33,4 +34,4 @@
<ItemGroup>
<ProjectReference Include="..\ExtractorUtils\ExtractorUtils.csproj" />
</ItemGroup>
</Project>
</Project>
2 changes: 2 additions & 0 deletions ExtractorUtils.Test/ExtractorUtils.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
<TargetFramework>net7.0</TargetFramework>
<IsPackable>false</IsPackable>
<EnableNETAnalyzers>false</EnableNETAnalyzers>
<AssemblyOriginatorKeyFile>$(SolutionDir)/strong_name.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.8.0" />
Expand Down
9 changes: 4 additions & 5 deletions ExtractorUtils/ExtractorUtils.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<LangVersion>8.0</LangVersion>
<Nullable>enable</Nullable>
<AssemblyOriginatorKeyFile>$(SolutionDir)/strong_name.snk</AssemblyOriginatorKeyFile>
<SignAssembly>True</SignAssembly>
</PropertyGroup>
<ItemGroup>
<None Include="..\LICENSE" Pack="true" Visible="false" PackagePath="" />
Expand All @@ -41,9 +42,7 @@
<Folder Include="Utils\" />
<Folder Include="config\" />
</ItemGroup>
<ItemGroup Condition = "'$(BuildWithCert)' != 'True'">
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleToAttribute">
<_Parameter1>ExtractorUtils.Test</_Parameter1>
</AssemblyAttribute>
<ItemGroup Condition="'$(BuildWithCert)' != 'True'">
<InternalsVisibleTo Include="ExtractorUtils.Test" Key="0024000004800000940000000602000000240000525341310004000001000100bde6ca813c4cc0cf79be8182f864b5337c00d71150f6ff8919d75f8a3402c0577d344b12a1b44e0d626ab4e3f1e94bdb74cdcd1fffa66a33eba89bb2a2c87e2aa0f8948263335ff452e78f8a9861a7d00bdba043edbe554779742c82781d9d11eead3d9fcef5dcfaa0c73caeab1212e46bbbfdb31181b9a141e9a0fc93a4a3ca" />
</ItemGroup>
</Project>
</Project>
7 changes: 5 additions & 2 deletions docfx_project/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
],
"dest": "api",
"disableGitFeatures": false,
"disableDefaultFilter": false
"disableDefaultFilter": false,
"properties": {
"SolutionDir": ".."
}
}
],
"build": {
Expand Down Expand Up @@ -73,4 +76,4 @@
"cleanupCacheHistory": false,
"disableGitFeatures": false
}
}
}
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.17.1
1.17.2

0 comments on commit 5992431

Please sign in to comment.