Skip to content

Commit af7eea3

Browse files
committed
feat(button): luck
1 parent 3d6f3ba commit af7eea3

File tree

4 files changed

+111
-6
lines changed

4 files changed

+111
-6
lines changed
File renamed without changes.

.github/workflows/reuseable-ci-checks.yml

Lines changed: 109 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,14 +345,121 @@ jobs:
345345

346346
reuseable-ci-checks-code-coverage:
347347
name: Check for code coverage
348+
timeout-minutes: 60
348349
runs-on: ubuntu-latest
349350
if: success() || failure()
350351
continue-on-error: ${{ inputs.runall }}
351352
outputs:
352353
status: ${{ job.status }}
353354
steps:
354-
- name: See other project pipeline for Tests
355-
run: echo " See other project pipeline for Tests this is a placeholder"
355+
- name: Checkout code
356+
uses: actions/checkout@v3
357+
358+
- name: Setup .NET
359+
uses: actions/setup-dotnet@v4
360+
with:
361+
global-json-file: global.json
362+
363+
- name: Replace local environment variable in nuget config because cant provide it as a parameter
364+
run: sed -i "s|%TELBlazorPackageSource%|$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH|g" nuget.config
365+
366+
- name: Clean lock files because the newly generated package file will superseed the locks
367+
run: |
368+
find . -name "packages.lock.json" -type f -exec rm -f {} \;
369+
370+
- name: Create appsettings development from secrets
371+
run: |
372+
declare -A paths
373+
paths["./TELBlazor.Components.UnitTests/appsettings.Development.json"]='${{ secrets.UNITTESTS_APPSETTINGS_DEVELOPMENT }}'
374+
paths["./TELBlazor.Components.ShowCase.WasmStaticClient/wwwroot/appsettings.Development.json"]='${{ secrets.WASMSTATICCLIENT_APPSETTINGS_DEVELOPMENT }}'
375+
paths["./TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/TELBlazor.Components.ShowCase.E2ETests.WasmServerHost.Client/wwwroot/appsettings.Development.json"]='${{ secrets.WASMSERVERHOSTCLIENT_APPSETTINGS_DEVELOPMENT }}'
376+
paths["./TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/appsettings.Development.json"]='${{ secrets.WASMSERVERHOST_APPSETTINGS_DEVELOPMENT }}'
377+
378+
# paths["./TELBlazor.Components.UnitTests/appsettings.Production.json"]='${{ secrets.UNITTESTS_APPSETTINGS_PRODUCTION }}'
379+
# paths["./TELBlazor.Components.ShowCase.WasmStaticClient/wwwroot/appsettings.Production.json"]='${{ secrets.WASMSTATICCLIENT_APPSETTINGS_PRODUCTION }}'
380+
# paths["./TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/TELBlazor.Components.ShowCase.E2ETests.WasmServerHost.Client/wwwroot/appsettings.Production.json"]='${{ secrets.WASMSERVERHOSTCLIENT_APPSETTINGS_PRODUCTION }}'
381+
# paths["./TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/TELBlazor.Components.ShowCase.E2ETests.WasmServerHost/appsettings.Production.json"]='${{ secrets.WASMSERVERHOST_APPSETTINGS_PRODUCTION }}'
382+
383+
384+
for path in "${!paths[@]}"; do
385+
mkdir -p "$(dirname "$path")"
386+
printf '%s' "${paths[$path]}" > "$path"
387+
done
388+
389+
390+
- name: Set up Node.js so we have gulp for retrieving TEL Frontend Css
391+
uses: actions/setup-node@v4
392+
with:
393+
node-version: '20'
394+
395+
- name: Install npm packages so we have gulp for retrieving TEL Frontend Css
396+
working-directory: ./TELBlazor.Components
397+
run: npm ci
398+
399+
- name: Install ReportGenerator
400+
run: dotnet tool restore
401+
402+
403+
404+
- name: Build and create package locally
405+
env:
406+
#Overwrite package generation
407+
DISABLE_PACKAGE_GENERATION: false
408+
run: |
409+
dotnet build TELBlazor.Components -c Debug \
410+
/p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \
411+
/p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \
412+
/p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \
413+
/p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE \
414+
/p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION \
415+
/p:E2ETracingEnabled=$E2E_TRACING_ENABLED \
416+
/p:HeadlessTesting=$HEADLESS_TESTING
417+
418+
- name: Build solution without generating new package
419+
env:
420+
#Overwrite package generation
421+
DISABLE_PACKAGE_GENERATION: true
422+
run: |
423+
dotnet build TELBlazor.sln -c Debug \
424+
/p:TELBlazorPackageVersion=$TELBLAZOR_PACKAGE_VERSION \
425+
/p:NupkgOutputPath=$TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH \
426+
/p:UseTELBlazorComponentsProjectReference=$USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE \
427+
/p:TELBlazorPackageSource=$TELBLAZOR_PACKAGE_SOURCE \
428+
/p:DisablePackageGeneration=$DISABLE_PACKAGE_GENERATION \
429+
/p:E2ETracingEnabled=$E2E_TRACING_ENABLED \
430+
/p:HeadlessTesting=$HEADLESS_TESTING
431+
432+
- name: Ensure browsers are installed
433+
run: pwsh TELBlazor.Components.ShowCase.E2ETests/bin/Debug/net8.0/playwright.ps1 install --with-deps
434+
435+
- name: Run tests with coverage
436+
env:
437+
TELBlazorPackageVersion: ${{ env.TELBLAZOR_PACKAGE_VERSION }}
438+
NupkgOutputPath: ${{ env.TELBLAZOR_PACKAGE_LOCAL_OUTPUT_PATH }}
439+
UseTELBlazorComponentsProjectReference: ${{ env.USE_TEL_BLAZOR_COMPONENTS_PROJECT_REFERENCE }}
440+
TELBlazorPackageSource: ${{ env.TELBLAZOR_PACKAGE_SOURCE }}
441+
DisablePackageGeneration: ${{ env.DISABLE_PACKAGE_GENERATION }}
442+
E2ETracingEnabled: ${{ env.E2E_TRACING_ENABLED }}
443+
HeadlessTesting: ${{ env.HEADLESS_TESTING }}
444+
run: |
445+
dotnet test --collect:"XPlat Code Coverage"
446+
447+
448+
- name: Generate Coverage Report
449+
run: |
450+
dotnet reportgenerator \
451+
-reports:"**/TestResults/**/coverage.cobertura.xml" \
452+
-targetdir:coveragereport \
453+
-reporttypes:Html \
454+
-thresholdtype:line \
455+
-threshold:80
456+
457+
- name: Upload Coverage Report
458+
if: always()
459+
uses: actions/upload-artifact@v3
460+
with:
461+
name: coverage-report
462+
path: coveragereport
356463

357464

358465
reuseable-ci-checks-check-for-failed-jobs:

TELBlazor.Components.ShowCase.WasmStaticClient/TELBlazor.Components.ShowCase.WasmStaticClient.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@
3434
<PackageReference Include="Serilog.Extensions.Logging" />
3535
<PackageReference Include="Blazored.LocalStorage" />
3636
<PackageReference Include="Microsoft.Extensions.Http" />
37-
<PackageReference Include="Serilog" />
38-
<PackageReference Include="Serilog.Extensions.Logging" />
3937
<PackageReference Include="Serilog.Formatting.Compact" />
4038
<PackageReference Include="Serilog.Settings.Configuration" />
4139
<PackageReference Include="Serilog.Sinks.BrowserConsole" />

TELBlazor.Components/TELBlazorPackageVersion/TELBlazorPackageVersionInformation.razor

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<div>
2-
<P><b>TELBlazor.Components Version : </b>@TELBlazor.Components.TELBlazorPackageVersion.VersionInfo.Version</P>
3-
<P><b>TELNHSUK Version : </b>TODO QQQQ</P>
2+
<p><b>TELBlazor.Components Version : </b>@TELBlazor.Components.TELBlazorPackageVersion.VersionInfo.Version</p>
3+
<p><b>TELNHSUK Version : </b>TODO QQQQ</p>
44
</div>
55

66

0 commit comments

Comments
 (0)