File tree 2 files changed +11
-4
lines changed
2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -127,6 +127,13 @@ jobs:
127
127
run : |
128
128
dotnet build --no-restore --configuration Release /p:VersionSuffix=$env:PACKAGE_VERSION_SUFFIX
129
129
- name : Test
130
+ env :
131
+ # Reduce logging output from tests in cibuild.
132
+ Logging__LogLevel__Microsoft.Hosting.Lifetime : ' None'
133
+ Logging__LogLevel__Microsoft.AspNetCore.Hosting.Diagnostics : ' None'
134
+ Logging__LogLevel__Microsoft.EntityFrameworkCore.Database.Command : ' None'
135
+ Logging__LogLevel__JsonApiDotNetCore : ' None'
136
+ Logging__LogLevel__DapperExample : ' None'
130
137
run : |
131
138
dotnet test --no-build --configuration Release --collect:"XPlat Code Coverage" --logger "GitHubActions;summary.includeSkippedTests=true"
132
139
- name : Upload coverage to codecov.io
Original file line number Diff line number Diff line change @@ -83,8 +83,8 @@ private WebApplicationFactory<TStartup> CreateFactory()
83
83
} ) ;
84
84
} ) ;
85
85
86
- // We have placed an appsettings.json in the TestBuildingBlock project folder and set the content root to there. Note that controllers
87
- // are not discovered in the content root but are registered manually using IntegrationTestContext.UseController.
86
+ // We have placed an appsettings.json in the TestBuildingBlocks project directory and set the content root to there. Note that
87
+ // controllers are not discovered in the content root, but are registered manually using IntegrationTestContext.UseController.
88
88
WebApplicationFactory < TStartup > factoryWithConfiguredContentRoot =
89
89
factory . WithWebHostBuilder ( builder => builder . UseSolutionRelativeContentRoot ( $ "test/{ nameof ( TestBuildingBlocks ) } ") ) ;
90
90
@@ -161,8 +161,8 @@ protected override IHostBuilder CreateHostBuilder()
161
161
. CreateDefaultBuilder ( null )
162
162
. ConfigureAppConfiguration ( builder =>
163
163
{
164
- // For tests asserting on log output, we discard the logging settings from appsettings.json.
165
- // But using appsettings.json for all other tests makes it easy to quickly toggle when debugging.
164
+ // For tests asserting on log output, we discard the log levels from appsettings.json and environment variables .
165
+ // But using appsettings.json for all other tests makes it easy to quickly toggle when debugging tests .
166
166
if ( _loggingConfiguration != null )
167
167
{
168
168
builder . Sources . Clear ( ) ;
You can’t perform that action at this time.
0 commit comments