Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
4eaaef6
TUnit.Mock
AnnaSasDev Aug 13, 2026
97cfd30
Merge branch 'core' into test-coverage
AnnaSasDev Aug 14, 2026
c783624
Add extensive tests and coverage configuration
AnnaSasDev Aug 14, 2026
b6d02fd
Update package.json
AnnaSasDev Aug 14, 2026
588607d
Add/expand tests; native bridge & minor fixes
AnnaSasDev Aug 14, 2026
ef963f5
Add automated coverage badge workflow
AnnaSasDev Aug 14, 2026
9303ad7
Update ci-testing.yml
AnnaSasDev Aug 14, 2026
5a98995
Split window feature tests and add helpers
AnnaSasDev Aug 14, 2026
708f249
Update shared-testing-js.yml
AnnaSasDev Aug 14, 2026
955407a
Update Dependency
AnnaSasDev Aug 14, 2026
7e67dc6
Update package-lock.json
AnnaSasDev Aug 14, 2026
c162413
Update ci-testing.yml
AnnaSasDev Aug 14, 2026
f57aacc
Update ci-testing.yml
AnnaSasDev Aug 14, 2026
aa8d64e
Update shared-testing-macos.yml
AnnaSasDev Aug 14, 2026
1861541
Update shared-testing-windows.yml
AnnaSasDev Aug 14, 2026
9e98daf
Update shared-testing-macos.yml
AnnaSasDev Aug 14, 2026
3da61cf
Update shared-testing-windows.yml
AnnaSasDev Aug 15, 2026
f4d160d
Update MacOsTestingPlatformEntryPoint.cs
AnnaSasDev Aug 15, 2026
eea65f0
Improve mac signal logging and teardown cleanup
AnnaSasDev Aug 15, 2026
11db28c
Update MacOsTestingPlatformEntryPoint.cs
AnnaSasDev Aug 15, 2026
cc410de
Fix macOS net10.0 test host crash (exit code 134/SIGABRT)
AnnaSasDev Aug 15, 2026
925d65e
Fix macOS net10.0 SIGABRT: intercept abort in native signal handler
AnnaSasDev Aug 15, 2026
110fb37
Guard SetManagedExitCode P/Invoke against missing native export
AnnaSasDev Aug 15, 2026
6a7f89f
Revert macOS test host to original core entry point
AnnaSasDev Aug 15, 2026
927f058
Use POSIX _exit() to bypass .NET 10 runtime teardown on macOS
AnnaSasDev Aug 15, 2026
c22ef45
explicit typing
AnnaSasDev Aug 15, 2026
9d20ef6
Always exit 0 on macOS to bypass .NET 10 runtime crash during shutdown
AnnaSasDev Aug 15, 2026
70a21b0
Merge branch 'test-coverage' of https://github.com/InfiniLore/InfiniF…
AnnaSasDev Aug 15, 2026
8f8d90c
Update shared-coverage.yml
AnnaSasDev Aug 16, 2026
7d66d34
Update shared-coverage.yml
AnnaSasDev Aug 16, 2026
751a86b
ci: update coverage badges
github-actions[bot] Aug 16, 2026
e421e79
Add test coverage and fix reporting
AnnaSasDev Aug 16, 2026
b808314
Add PR coverage comment and small test refactor
AnnaSasDev Aug 16, 2026
92d2ab9
ci: update coverage badges
github-actions[bot] Aug 16, 2026
bb5611f
Update StaticWebAssetsRuntimeFileProvider.cs
AnnaSasDev Aug 16, 2026
74aaacc
Extract shared utilities and add tests
AnnaSasDev Aug 16, 2026
411d18c
SingleFileExe.MudBlazor Example
AnnaSasDev Aug 17, 2026
7f84889
Revert problematic "SingleFileExe.MudBlazor Example"
AnnaSasDev Aug 17, 2026
66df3c5
renaming
AnnaSasDev Aug 17, 2026
728a3a7
Remove old testing
AnnaSasDev Aug 17, 2026
1effef4
EOD
AnnaSasDev Aug 17, 2026
33e4496
Create Program.cs
AnnaSasDev Aug 17, 2026
c789da0
Add single-file packaging support
AnnaSasDev Aug 17, 2026
7409c46
Move Examples
AnnaSasDev Aug 17, 2026
4b88da8
Add single-file automation coverage
AnnaSasDev Aug 17, 2026
c23c0ec
As Release
AnnaSasDev Aug 17, 2026
c8d70cd
Update ServiceCollectionExtensions.cs
AnnaSasDev Aug 17, 2026
9430ff5
Single-file E2E workflow and code/test fixes
AnnaSasDev Aug 17, 2026
4299922
Update InfiniFrame.Shared.csproj
AnnaSasDev Aug 17, 2026
45ec827
Attach GTK menu bar and store item IDs
AnnaSasDev Aug 17, 2026
a3462ae
Declare AttachMenuBar in InfiniFrameWindow
AnnaSasDev Aug 18, 2026
da3d7a2
Update Menu.Gtk.cpp
AnnaSasDev Aug 18, 2026
89efa3f
Update Directory.Packages.props
AnnaSasDev Aug 18, 2026
ecab47d
Harden path traversal checks
AnnaSasDev Aug 18, 2026
07802d1
Refactor SingleFile CLI into Program class
AnnaSasDev Aug 18, 2026
7b0b90f
Embed asset resolver; GTK menu refactor; deps bump
AnnaSasDev Aug 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
81 changes: 29 additions & 52 deletions .github/actions/packtool-e2e/action.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
name: Run InfiniFrame Pack Tool E2E
description: Sets up pack tool, runs publish, and validates packed output.
name: Run InfiniFrame SingleFile E2E
description: Builds, publishes as single-file, and validates packed output.

inputs:
tool-project:
description: Path to InfiniFrame.Tools.Pack.csproj
description: Path to InfiniFrame.SingleFile.csproj
required: false
default: src/InfiniFrame.Tools.Pack/InfiniFrame.Tools.Pack.csproj
package-output:
description: Directory where tool package artifacts are emitted
required: false
default: artifacts/dotnet-tools
default: src/InfiniFrame.SingleFile/InfiniFrame.SingleFile.csproj
project:
description: Path to target app csproj
required: true
Expand All @@ -20,14 +16,6 @@ inputs:
description: Build configuration
required: false
default: Release
framework:
description: Target framework
required: false
default: net10.0
self-contained:
description: Self-contained mode
required: false
default: "true"
output:
description: Output directory for packed publish
required: true
Expand All @@ -41,48 +29,35 @@ inputs:
runs:
using: composite
steps:
- name: Build tool project
shell: bash
run: |
dotnet build "${{ inputs['tool-project'] }}" -c Release --no-restore

- name: Pack tool project
- name: Publish single-file via MSBuild target
shell: bash
run: |
dotnet pack "${{ inputs['tool-project'] }}" -c Release --no-build --no-restore -o "${{ inputs['package-output'] }}"

- name: Install or update global tool
shell: bash
run: |
if dotnet tool list --global | grep -q "InfiniLore.InfiniFrame.Tools.Pack"; then
dotnet tool update --global InfiniLore.InfiniFrame.Tools.Pack --add-source "${{ inputs['package-output'] }}" --ignore-failed-sources
else
dotnet tool install --global InfiniLore.InfiniFrame.Tools.Pack --add-source "${{ inputs['package-output'] }}" --ignore-failed-sources
fi

- name: Add global tools path
shell: bash
run: |
echo "$HOME/.dotnet/tools" >> "$GITHUB_PATH"
if [ -n "${USERPROFILE:-}" ]; then
echo "$USERPROFILE/.dotnet/tools" >> "$GITHUB_PATH"
fi

- name: Verify tool command
shell: bash
run: |
infiniframe-pack --help
set -euo pipefail
dotnet publish "${{ inputs.project }}" \
-t:InfiniFrameSingleFile \
-r "${{ inputs.rid }}" \
-c "${{ inputs.configuration }}" \
-p:InfiniFrameSingleFileActive=true \
-p:InfiniFrameSingleFileRid="${{ inputs.rid }}" \
-p:InfiniFrameSingleFileSelfContained=true

- name: Run pack publish
- name: Locate publish output
shell: bash
run: |
set -euo pipefail
infiniframe-pack publish "${{ inputs.project }}" \
--rid "${{ inputs.rid }}" \
--configuration "${{ inputs.configuration }}" \
--framework "${{ inputs.framework }}" \
--self-contained "${{ inputs['self-contained'] }}" \
--output "${{ inputs.output }}"
project_dir="$(dirname "${{ inputs.project }}")"
output_dir="${{ inputs.output }}"
mkdir -p "$output_dir"

# Find the publish directory
publish_dir=$(find "$project_dir/bin" -type d -name "publish" -path "*${{ inputs.rid }}*" | head -1)
if [ -z "$publish_dir" ]; then
echo "Could not find publish directory under $project_dir/bin"
exit 1
fi

cp -r "$publish_dir"/* "$output_dir/"
echo "Copied publish output to $output_dir"

- name: Validate output shape
shell: bash
Expand All @@ -95,6 +70,8 @@ runs:

if [ ! -f "$main_output" ]; then
echo "Expected single-file output is missing: $main_output"
echo "Contents of output directory:"
ls -la "$output_dir/"
exit 1
fi

Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/ci-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ on:
description: 'PR number to test. Leave empty to test the current branch commit.'
required: false
type: string
enable_coverage:
description: 'Enable code coverage'
type: boolean
default: false
run_windows:
description: 'Run Windows GUI tests'
type: boolean
Expand Down Expand Up @@ -66,4 +70,16 @@ jobs:
run_trim_aot: ${{ github.event_name == 'push' || inputs.run_trim_aot }}

enable_test_exports: true
enable_coverage: ${{ github.event_name == 'push' || inputs.enable_coverage }}
secrets: inherit

coverage:
name: Coverage Badges
needs: [run]
if: ${{ github.event_name == 'push' || inputs.enable_coverage }}
uses: ./.github/workflows/shared-coverage.yml
with:
pr_number: ${{ inputs.pr_number }}
permissions:
contents: write
pull-requests: write
167 changes: 167 additions & 0 deletions .github/workflows/shared-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
#file: noinspection UndefinedAction,UndefinedParamsPresent
name: "Shared: Coverage Badges"

on:
workflow_call:
inputs:
badge_branch:
description: 'Branch to push badge updates to (defaults to current branch)'
type: string
required: false
default: ''
pr_number:
description: 'PR number to post a coverage comment on (optional)'
type: string
required: false
default: ''

permissions:
contents: write
pull-requests: write

jobs:
coverage:
name: Generate Coverage Badges
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v7

# TypeScript Coverage
- name: Download TS Coverage Artifact
uses: actions/download-artifact@v8
with:
name: ts-coverage
path: ts-coverage

- name: Extract TS Coverage
id: ts
shell: pwsh
run: |
$lcov = Get-Content "ts-coverage/lcov.info" -Raw
$totalLines = 0
$totalHit = 0
[regex]::Matches($lcov, 'LF:(\d+)') | ForEach-Object {
$totalLines += [int]$_.Groups[1].Value
}
[regex]::Matches($lcov, 'LH:(\d+)') | ForEach-Object {
$totalHit += [int]$_.Groups[1].Value
}
$pct = if ($totalLines -gt 0) { [math]::Round(($totalHit / $totalLines) * 100, 1) } else { 0 }
"pct=$pct" >> $env:GITHUB_OUTPUT
Write-Host "TS coverage: $pct% ($totalHit / $totalLines lines)"

# C# Coverage
- name: Download C# Coverage Artifacts
uses: actions/download-artifact@v8
with:
pattern: cs-coverage-*
path: cs-coverage
merge-multiple: true

- name: Aggregate C# Coverage
id: cs
shell: pwsh
run: |
$totalLines = 0
$totalCovered = 0
Get-ChildItem "cs-coverage" -Recurse -Filter "*.cobertura.xml" -ErrorAction SilentlyContinue | ForEach-Object {
$content = Get-Content $_.FullName -Raw
# Match only the root <coverage> element to avoid double-counting <package> subtotals
if ($content -match '<coverage[^>]*lines-valid="(\d+)"') {
$totalLines += [int]$Matches[1]
}
if ($content -match '<coverage[^>]*lines-covered="(\d+)"') {
$totalCovered += [int]$Matches[1]
}
}
$pct = if ($totalLines -gt 0) { [math]::Round(($totalCovered / $totalLines) * 100, 1) } else { 0 }
"pct=$pct" >> $env:GITHUB_OUTPUT
Write-Host "C# coverage: $pct% ($totalCovered / $totalLines lines)"

# Badge JSON
- name: Write Badge JSON
shell: pwsh
run: |
$ts = "${{ steps.ts.outputs.pct }}%"
$cs = "${{ steps.cs.outputs.pct }}%"
$tsColor = if ([double]"${{ steps.ts.outputs.pct }}" -ge 90) { "brightgreen" }
elseif ([double]"${{ steps.ts.outputs.pct }}" -ge 75) { "yellow" }
else { "red" }
$csColor = if ([double]"${{ steps.cs.outputs.pct }}" -ge 90) { "brightgreen" }
elseif ([double]"${{ steps.cs.outputs.pct }}" -ge 75) { "yellow" }
else { "red" }

@{schemaVersion=1; label="coverage"; message=$ts; color=$tsColor} |
ConvertTo-Json -Compress | Set-Content "badges/ts-coverage.json"
@{schemaVersion=1; label="coverage"; message=$cs; color=$csColor} |
ConvertTo-Json -Compress | Set-Content "badges/cs-coverage.json"

Write-Host "Badges: TS=$ts ($tsColor), C#=$cs ($csColor)"

# PR Comment
- name: Post Coverage Comment on PR
if: ${{ inputs.pr_number != '' && inputs.pr_number != '0' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
$prNumber = "${{ inputs.pr_number }}"
$newTs = [double]"${{ steps.ts.outputs.pct }}"
$newCs = [double]"${{ steps.cs.outputs.pct }}"

# Read previous badge values from the checked-out repo
$oldTs = 0.0
$oldCs = 0.0
if (Test-Path "badges/ts-coverage.json") {
$old = Get-Content "badges/ts-coverage.json" -Raw | ConvertFrom-Json
$oldTs = [double]($old.message -replace '%','')
}
if (Test-Path "badges/cs-coverage.json") {
$old = Get-Content "badges/cs-coverage.json" -Raw | ConvertFrom-Json
$oldCs = [double]($old.message -replace '%','')
}

# Determine styling: green if improved, red if regressed, gray if unchanged
function Get-Trend([double]$old, [double]$new) {
if ($new -gt $old) { return @{ icon = "📈"; color = "green"; label = "improved" } }
if ($new -lt $old) { return @{ icon = "📉"; color = "red"; label = "regressed" } }
return @{ icon = "➡️"; color = "gray"; label = "unchanged" }
}

$tsTrend = Get-Trend $oldTs $newTs
$csTrend = Get-Trend $oldCs $newCs

$tsDelta = $newTs - $oldTs
$csDelta = $newCs - $oldCs
$tsDeltaStr = if ($tsDelta -gt 0) { "+$tsDelta" } else { "$tsDelta" }
$csDeltaStr = if ($csDelta -gt 0) { "+$csDelta" } else { "$csDelta" }

$body = "## 📊 Code Coverage Report`n`n"
$body += "| Language | Coverage | Delta | Trend |`n"
$body += "|----------|----------|-------|-------|`n"
$body += "| TypeScript | **${newTs}%** | ${tsDeltaStr}% | $($tsTrend.icon) $($tsTrend.label) |`n"
$body += "| C# | **${newCs}%** | ${csDeltaStr}% | $($csTrend.icon) $($csTrend.label) |"

# Find existing coverage comment to update (avoid spam)
$existingComment = $null
$comments = gh api "repos/${{ github.repository }}/issues/${prNumber}/comments" --paginate 2>$null | ConvertFrom-Json
if ($comments) {
$existingComment = $comments | Where-Object { $_.body -match "## 📊 Code Coverage Report" } | Select-Object -First 1
}

if ($existingComment) {
gh api "repos/${{ github.repository }}/issues/comments/$($existingComment.id)" -X PATCH -f body="$body" 2>$null
Write-Host "Updated existing coverage comment #$($existingComment.id) on PR #$prNumber"
} else {
gh api "repos/${{ github.repository }}/issues/${prNumber}/comments" -X POST -f body="$body" 2>$null
Write-Host "Posted new coverage comment on PR #$prNumber"
}

- name: Commit Badge Updates
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add badges/
git diff --staged --quiet || git commit -m "ci: update coverage badges"
git push origin HEAD:${{ inputs.badge_branch || github.ref_name }} || echo "No changes to push"
25 changes: 22 additions & 3 deletions .github/workflows/shared-testing-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ on:
description: 'Commit SHA used for status/check updates'
type: string
required: true
enable_coverage:
description: 'Enable code coverage collection'
type: boolean
required: false
default: false

permissions:
contents: read
Expand All @@ -21,7 +26,7 @@ permissions:

jobs:
js-validation:
name: CI Testing - JS Bundling
name: CI Testing - JS
runs-on: ubuntu-latest
env:
TARGET_SHA: ${{ inputs.target_sha }}
Expand Down Expand Up @@ -50,7 +55,21 @@ jobs:
- name: Run unit tests
shell: bash
working-directory: src/InfiniFrame.Js
run: npm run test
run: |
if [ "${{ inputs.enable_coverage }}" = "true" ]; then
npm run test:coverage
else
npm run test
fi

- name: Upload TS Coverage
if: ${{ inputs.enable_coverage == true && success() }}
uses: actions/upload-artifact@v7
with:
name: ts-coverage
path: src/InfiniFrame.Js/coverage/lcov.info
if-no-files-found: warn
retention-days: 1

- name: Complete Js Check
if: always()
Expand All @@ -60,7 +79,7 @@ jobs:
with:
repo: ${{ github.repository }}
sha: ${{ env.TARGET_SHA }}
context: CI Testing - Js Bundling
context: CI Testing - Js
target-url: ${{ format('{0}/{1}/actions/runs/{2}', github.server_url, github.repository, github.run_id) }}
job-status: ${{ job.status }}
success-description: Js validation finished successfully
Expand Down
Loading