Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .codex/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[mcp_servers.avalonia-docs]
url = "https://docs-mcp.avaloniaui.net/mcp"
20 changes: 20 additions & 0 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"version": 1,
"isRoot": true,
"tools": {
"dotnet-reportgenerator-globaltool": {
"version": "5.5.10",
"commands": [
"reportgenerator"
],
"rollForward": false
},
"dotnet-stryker": {
"version": "4.16.0",
"commands": [
"dotnet-stryker"
],
"rollForward": false
}
}
}
673 changes: 673 additions & 0 deletions .editorconfig

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Line endings are declared in .editorconfig (end_of_line = crlf) and enforced
# on C# by `dotnet format whitespace`. Without this file the working-tree result
# depends on each contributor's core.autocrlf setting, so the same checkout can
# pass locally and fail the format gate in CI.
#
# Everything text-like is stored as LF and checked out as CRLF, which matches
# what the index already contains, so this changes no stored content.
* text=auto eol=crlf

# Binary assets must never be normalized or diffed as text.
*.png binary
*.jpg binary
*.ico binary
28 changes: 0 additions & 28 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

50 changes: 50 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Package versions are centralized in Directory.Packages.props, which Dependabot
# updates in place. Two things here are deliberately not covered and stay manual:
# the SDK pin in global.json, and the tool pin in .config/dotnet-tools.json.
#
# Updates are grouped so a framework arrives as one reviewable pull request
# rather than one per package. Every pull request still has to clear the full
# build, which treats style, naming, and code quality violations as errors, so a
# bump that introduces a new diagnostic will fail until it is dealt with.
version: 2

updates:
- package-ecosystem: nuget
directory: "/"
schedule:
interval: weekly
day: monday
open-pull-requests-limit: 5
commit-message:
prefix: chore
include: scope
groups:
avalonia:
patterns:
- "Avalonia*"
serilog:
patterns:
- "Serilog*"
microsoft-extensions:
patterns:
- "Microsoft.Extensions.*"
test-tooling:
patterns:
- "coverlet.*"
- "FluentAssertions"
- "Microsoft.NET.Test.Sdk"
- "NSubstitute*"
- "xunit*"

- package-ecosystem: github-actions
directory: "/"
schedule:
interval: weekly
day: monday
commit-message:
prefix: ci
include: scope
groups:
actions:
patterns:
- "*"
126 changes: 126 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
name: CI

on:
push:
pull_request:
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true
# Normalizes source paths in the produced assemblies, which is what makes the
# Deterministic setting in Directory.Build.props reproducible off this machine.
ContinuousIntegrationBuild: true

jobs:
build-and-test:
name: Build, test, and verify coverage
runs-on: windows-2025
timeout-minutes: 20
env:
GENLAUNCHERGO_REQUIRE_SYMBOLIC_LINK_TESTS: true

steps:
- name: Check out repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6

- name: Set up .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
with:
global-json-file: global.json

- name: Restore
run: dotnet restore .\GenLauncherGO.sln

# Style, naming, and code quality rules are `error` in .editorconfig and
# run through EnforceCodeStyleInBuild, so the build itself is the primary
# gate.
- name: Build
run: dotnet build .\GenLauncherGO.sln --configuration Release --no-restore

# Runs the whitespace, style, and analyzer formatters. Not redundant with
# the build: whitespace and end-of-line violations are reported here only,
# as are style fixers that have no build-time implementation. Configuration
# independent, so once is enough.
- name: Verify formatting
run: dotnet format .\GenLauncherGO.sln --verify-no-changes --no-restore

- name: Test with coverage backstop
run: dotnet msbuild .\eng\coverage.proj -target:Coverage -property:Configuration=Release -property:SkipCoverageBuild=true

# Mutation testing is the gate for whether behavior is actually asserted; the coverage
# backstop above only proves a line executed. One job per production area: fanning them out
# keeps each area's break threshold enforceable on its own and keeps wall-clock bounded, and
# fail-fast is off so a regression in one area does not hide the state of the others.
#
# GenLauncherGO.UI is absent by necessity, not oversight. Avalonia emits InitializeComponent
# and the x:Name backing fields from a Roslyn source generator; Stryker recompiles from
# parsed syntax trees without running generators, so every .axaml.cs fails to compile and the
# run aborts. See eng/mutation.proj.
mutation-quality:
name: Mutation quality (${{ matrix.area }})
runs-on: windows-2025
timeout-minutes: 45
strategy:
fail-fast: false
matrix:
area:
- core
- infrastructure-common
- infrastructure-integrity
- infrastructure-launching
- infrastructure-mods
- infrastructure-platform
- infrastructure-updating
env:
GENLAUNCHERGO_REQUIRE_SYMBOLIC_LINK_TESTS: true

steps:
- name: Check out repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6

- name: Set up .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
with:
global-json-file: global.json

- name: Restore
run: dotnet restore .\GenLauncherGO.sln

- name: Test mutations
run: dotnet msbuild .\eng\mutation.proj -target:Mutation -property:MutationConfiguration=${{ matrix.area }}

publish-smoke-test:
name: Publish smoke test
runs-on: windows-2025
timeout-minutes: 20

steps:
- name: Check out repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6

- name: Set up .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
with:
global-json-file: global.json

- name: Publish supported single-file executable
shell: pwsh
run: |
$publishDirectory = Join-Path $env:RUNNER_TEMP "GenLauncherGO-publish"
dotnet publish .\GenLauncherGO.UI\GenLauncherGO.UI.csproj -p:PublishProfile=WinX64SelfContained --output $publishDirectory
$launcherPath = Join-Path $publishDirectory "GenLauncherGO.exe"
if (-not (Test-Path -LiteralPath $launcherPath -PathType Leaf)) {
throw "Expected the supported launcher executable at $launcherPath."
}
$looseLibraries = @(Get-ChildItem -LiteralPath $publishDirectory -Filter "*.dll" -File -Recurse)
if ($looseLibraries.Count -ne 0) {
throw "The supported single-file publish unexpectedly produced loose DLL files."
}
58 changes: 58 additions & 0 deletions .github/workflows/dependency-audit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: Dependency audit

on:
schedule:
# Weekly, so advisory checks run without waiting for a code change.
- cron: "0 6 * * 1"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_NOLOGO: true

jobs:
dependency-audit:
name: Dependency audit
runs-on: windows-2025
timeout-minutes: 15

# NU1901-NU1904 are downgraded to warnings in Directory.Build.props so that a
# newly published advisory cannot fail an unrelated pull request. This job is
# the other half of that decision: it fails loudly, on a schedule, so the
# findings are acted on rather than merely visible.
steps:
- name: Check out repository
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6

- name: Set up .NET
uses: actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5
with:
global-json-file: global.json

- name: Restore
run: dotnet restore .\GenLauncherGO.sln

- name: Fail on vulnerable packages
shell: pwsh
run: |
$report = dotnet list .\GenLauncherGO.sln package --vulnerable --include-transitive | Out-String
Write-Host $report
if ($report -match "has the following vulnerable packages") {
throw "Vulnerable packages detected. See the report above."
}

- name: Report deprecated packages
shell: pwsh
run: |
$report = dotnet list .\GenLauncherGO.sln package --deprecated | Out-String
Write-Host $report
if ($report -match "has the following deprecated packages") {
throw "Deprecated packages detected. See the report above."
}
Loading