-
-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
530 additions
and
322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,9 +5,10 @@ on: | |
|
||
env: | ||
ConnectionStrings__SqlServerConnectionString: 'Data Source=localhost; Initial Catalog=BoilerplateTestDb;Application Name=Boilerplate;TrustServerCertificate=True;User Id=sa;Password=P@ssw0rdP@ssw0rd;' | ||
SIMPLE_TEST_FILTER: "FullyQualifiedName!~PageTests" | ||
BLAZOR_SERVER_TEST_FILTER: "PageTests.BlazorServer" | ||
BLAZOR_WASM_TEST_FILTER: "PageTests.BlazorWebAssembly" | ||
SIMPLE_TEST_FILTER: "ClassName!~PageTests" | ||
BLAZOR_SERVER_TEST_FILTER: "ClassName~PageTests.BlazorServer" | ||
BLAZOR_WASM_TEST_FILTER: "ClassName~PageTests.BlazorWebAssembly" | ||
MULTILINGUAL_DISABLED_TEST_FILTER: "ClassName!~LocalizationTests|TestCategory=MultilingualDisabled" | ||
|
||
jobs: | ||
|
||
|
@@ -100,7 +101,7 @@ jobs: | |
- name: Test SqlServer database option | ||
id: sqlserver-test | ||
run: | | ||
dotnet new bit-bp --name TestSqlServer --database SqlServer | ||
dotnet new bit-bp --name TestSqlServer --database SqlServer --advancedTests | ||
cd TestSqlServer/src/Server/TestSqlServer.Server.Api/ | ||
dotnet tool restore | ||
dotnet ef migrations add InitialMigration | ||
|
@@ -115,6 +116,25 @@ jobs: | |
path: ./TestSqlServer/src/Tests/TestResults | ||
retention-days: 14 | ||
|
||
- name: Test Multilingual disabled option | ||
id: multilingual-disabled-test | ||
run: | | ||
dotnet new bit-bp --name MultilingualDisabled --database Sqlite --advancedTests | ||
cd MultilingualDisabled/src/Server/MultilingualDisabled.Server.Api/ | ||
dotnet tool restore | ||
dotnet ef migrations add InitialMigration | ||
dotnet ef database update | ||
cd ../../Tests | ||
dotnet test -p:MultilingualEnabled=false --logger GitHubActions --filter "${{ env.MULTILINGUAL_DISABLED_TEST_FILTER }}" -- MSTest.Parallelize.Workers=1 | ||
- name: Upload Tests Artifact | ||
uses: actions/[email protected] | ||
if: ${{ !env.ACT && failure() && steps.multilingual-disabled-test.conclusion == 'failure' }} | ||
with: | ||
name: tests-artifact | ||
path: ./MultilingualDisabled/src/Tests/TestResults | ||
retention-days: 14 | ||
|
||
- name: Test PostgreSQL, Cosmos, MySql, Other database options | ||
run: | | ||
dotnet new bit-bp --name TestPostgreSQL --database PostgreSQL | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-164 Bytes
(95%)
src/BlazorUI/Bit.BlazorUI/wwwroot/fonts/FabMDL2.4.66.bit.BlazorUI.woff2
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 27 additions & 3 deletions
30
...it.Boilerplate/src/Client/Boilerplate.Client.Core/Extensions/ILoggingBuilderExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,35 @@ | ||
namespace Microsoft.Extensions.Logging; | ||
using Boilerplate.Client.Core.Services.DiagnosticLog; | ||
|
||
namespace Microsoft.Extensions.Logging; | ||
|
||
public static class ILoggingBuilderExtensions | ||
{ | ||
public static ILoggingBuilder AddBrowserConsoleLogger(this ILoggingBuilder builder) | ||
public static ILoggingBuilder AddDiagnosticLogger(this ILoggingBuilder builder) | ||
{ | ||
builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<ILoggerProvider, BrowserConsoleLoggerProvider>()); | ||
builder.Services.AddSessioned<DiagnosticLogger>(); | ||
builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<ILoggerProvider, DiagnosticLoggerProvider>()); | ||
|
||
return builder; | ||
} | ||
|
||
public static ILoggingBuilder ConfigureLoggers(this ILoggingBuilder loggingBuilder) | ||
{ | ||
loggingBuilder.ClearProviders(); | ||
|
||
if (AppEnvironment.IsDev()) | ||
{ | ||
loggingBuilder.AddDebug(); | ||
} | ||
|
||
if (!AppPlatform.IsBrowser) | ||
{ | ||
loggingBuilder.AddConsole(); | ||
// DiagnosticLogger is already logging in browser's console. | ||
// But Console logger is still useful in Visual Studio's Device Log (Android, iOS) or BrowserStack etc. | ||
} | ||
|
||
loggingBuilder.AddDiagnosticLogger(); | ||
|
||
return loggingBuilder; | ||
} | ||
} |
90 changes: 0 additions & 90 deletions
90
...t.Boilerplate/src/Client/Boilerplate.Client.Core/Services/BrowserConsoleLoggerProvider.cs
This file was deleted.
Oops, something went wrong.
19 changes: 19 additions & 0 deletions
19
...Boilerplate/src/Client/Boilerplate.Client.Core/Services/Contracts/CurrentScopeProvider.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using Boilerplate.Client.Core.Components; | ||
|
||
namespace Boilerplate.Client.Core.Services.Contracts; | ||
|
||
/// <summary> | ||
/// Provides the current scope's <see cref="IServiceProvider"/>. | ||
/// | ||
/// In different hosting environments, this delegate returns the `IServiceProvider` from: | ||
/// | ||
/// - **Blazor Server, SSR, and Pre-rendering:** `HttpContextAccessor.HttpContext.RequestServices` | ||
/// - **Blazor WebAssembly and Hybrid:** Gets it from <see cref="ClientAppCoordinator.CurrentServiceProvider"/> | ||
/// | ||
/// The delegate may return `null` in the following scenarios: | ||
/// | ||
/// - When there's no active `HttpContext` in backend environments. | ||
/// - When the Routes.razor page is not loaded yet. | ||
/// </summary> | ||
/// <returns>The current scope's `IServiceProvider`, or `null` if not available.</returns> | ||
public delegate IServiceProvider? CurrentScopeProvider(); |
Oops, something went wrong.