Skip to content

Commit 3f85e46

Browse files
committed
deterministic paths in coverage output
1 parent 0819331 commit 3f85e46

File tree

6 files changed

+7
-15
lines changed

6 files changed

+7
-15
lines changed

.github/workflows/dotnet.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
33

44
# General links
5-
# https://docs.github.com/en/actions/learn-github-actions/variables
5+
# https://docs.github.com/en/actions/learn-github-actions/variables#default-environment-variables
66
# https://docs.github.com/en/actions/learn-github-actions/contexts#github-context
77
# https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads
88
# https://docs.github.com/en/actions/learn-github-actions/expressions
@@ -118,8 +118,7 @@ jobs:
118118
dotnet build --no-restore --configuration Release --version-suffix=$env:PACKAGE_VERSION_SUFFIX
119119
- name: Test
120120
run: |
121-
#dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --logger "GitHubActions;summary.includeSkippedTests=true" -- RunConfiguration.CollectSourceInformation=true
122-
dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage"
121+
dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --logger "GitHubActions;summary.includeSkippedTests=true" -- RunConfiguration.CollectSourceInformation=true DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.DeterministicReport=true
123122
- name: Upload coverage to codecov.io
124123
# TODO: Why does codecov report 3.83% decreased coverage?
125124
if: matrix.os == 'ubuntu-latest'

Directory.Build.props

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
<AdditionalFiles Include="$(MSBuildThisFileDirectory)CSharpGuidelinesAnalyzer.config" Visible="False" />
2222
</ItemGroup>
2323

24+
<PropertyGroup Condition="'$(APPVEYOR)' != '' Or '$(CI)' != ''">
25+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
26+
</PropertyGroup>
27+
2428
<PropertyGroup Condition="'$(Configuration)'=='Release'">
2529
<NoWarn>$(NoWarn);1591</NoWarn>
2630
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>

src/JsonApiDotNetCore.Annotations/JsonApiDotNetCore.Annotations.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
<DebugType>embedded</DebugType>
2424
</PropertyGroup>
2525

26-
<PropertyGroup Condition="'$(APPVEYOR)' != ''">
27-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
28-
</PropertyGroup>
29-
3026
<ItemGroup>
3127
<None Include="..\..\logo.png" Visible="false" Pack="True" PackagePath="" />
3228
<None Include="..\..\PackageReadme.md" Visible="false" Pack="True" PackagePath="" />

src/JsonApiDotNetCore.SourceGenerators/JsonApiDotNetCore.SourceGenerators.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,6 @@
2323
<RepositoryUrl>https://github.com/json-api-dotnet/JsonApiDotNetCore</RepositoryUrl>
2424
</PropertyGroup>
2525

26-
<PropertyGroup Condition="'$(APPVEYOR)' != ''">
27-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
28-
</PropertyGroup>
29-
3026
<ItemGroup>
3127
<None Include="..\..\logo.png" Visible="false" Pack="True" PackagePath="" />
3228
<None Include="..\..\PackageReadme.md" Visible="false" Pack="True" PackagePath="" />

src/JsonApiDotNetCore/JsonApiDotNetCore.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121
<DebugType>embedded</DebugType>
2222
</PropertyGroup>
2323

24-
<PropertyGroup Condition="'$(APPVEYOR)' != ''">
25-
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
26-
</PropertyGroup>
27-
2824
<ItemGroup>
2925
<None Include="..\..\logo.png" Visible="false" Pack="True" PackagePath="" />
3026
<None Include="..\..\PackageReadme.md" Visible="false" Pack="True" PackagePath="" />

test/TestBuildingBlocks/IntegrationTest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public abstract class IntegrationTest : IAsyncLifetime
1818

1919
static IntegrationTest()
2020
{
21+
// GitHub Actions: Should we keep this? If so, check for CI environment variable.
2122
int maxConcurrentTestRuns = Environment.GetEnvironmentVariable("APPVEYOR") != null ? 32 : 64;
2223
ThrottleSemaphore = new SemaphoreSlim(maxConcurrentTestRuns);
2324
}

0 commit comments

Comments
 (0)