mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2026-03-30 02:07:07 +00:00
* Initial plan * Refactor tests: rename UnitTests to UnitTests.Legacy, add UnitTests.NonParallelizable Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/ef0c73fd-ea61-4cf7-a133-0722922a198b * Fix IntegrationTests.csproj: update project reference from UnitTests to UnitTests.Legacy Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/afc0cfa3-f67a-4db4-8d95-0ca2c16b0d11 * Step 4 iteration 1: delete 37 Legacy test files already covered in UnitTestsParallelizable Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f62dad05-cd4b-4fd9-8b7e-9b1d88aeaaa6 * Step 4 iteration 2: delete 14 more Legacy test files covered in UnitTestsParallelizable Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f62dad05-cd4b-4fd9-8b7e-9b1d88aeaaa6 * Step 4 iteration 3: delete 5 more Legacy test files (Config and TextView/TreeView) Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f62dad05-cd4b-4fd9-8b7e-9b1d88aeaaa6 * Step 4 iteration 4: delete UICatalog tests, move ConfigurationManager+Glyph to NonParallelizable Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f62dad05-cd4b-4fd9-8b7e-9b1d88aeaaa6 * Step 4 iteration 5: delete FrameViewTests (covered incidentally in Para) Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f62dad05-cd4b-4fd9-8b7e-9b1d88aeaaa6 * Step 4 iteration 6: delete StatusBarTests (covered by BarTests in Para) Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f62dad05-cd4b-4fd9-8b7e-9b1d88aeaaa6 * Fix code style: remove trailing whitespace and extra blank lines in NonParallelizable tests Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/f62dad05-cd4b-4fd9-8b7e-9b1d88aeaaa6 * Step 4 iteration 7: SpinnerViewTests - add minimal Para tests, delete from Legacy Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/2624235d-70c6-4167-986a-2e356513e790 * Step 4 iteration 8: TreeTableSourceTests - add 4 minimal Para tests, delete from Legacy Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/2624235d-70c6-4167-986a-2e356513e790 * Step 4 iteration 9: SynchronizatonContextTests - add 2 minimal NonParallelizable tests, delete from Legacy Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/2624235d-70c6-4167-986a-2e356513e790 * Step 4 iteration 10: FileSystemCollectionNavigationMatcher tests - add 3 minimal Para tests, delete 4 from Legacy Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/2624235d-70c6-4167-986a-2e356513e790 * Step 4 iteration 11: delete TabViewTests from Legacy (TabView being rewritten) Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/06b03a9b-22cd-4d33-98b1-c0fd8e054a30 * Step 4 iteration 12: AppendAutocompleteTests - add 4 minimal Para tests, delete 8 from Legacy Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/c1ef1d35-7f93-49ac-80a1-929efdc72376 * Step 4 iteration 13: ProgressBarTests - add 4 minimal Para tests, delete 9 from Legacy Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/c1ef1d35-7f93-49ac-80a1-929efdc72376 * Step 4 iteration 14: FileDialogTests - add 13 AllowedType Para tests, delete Legacy Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/c1ef1d35-7f93-49ac-80a1-929efdc72376 * Step 4 iteration 15: GraphViewTests - add 8 minimal Para tests, delete 44 from Legacy Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/c1ef1d35-7f93-49ac-80a1-929efdc72376 * Step 4 iteration 16: TableViewTests - add 15 minimal Para tests, delete Legacy (0 remaining) Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/c1ef1d35-7f93-49ac-80a1-929efdc72376 * Fix CI: remove UnitTests.Legacy step from workflow (project now has 0 tests, exit code 8) Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/c64ea856-e29d-4929-a7a3-ec6d4737cb6a * Update SynchronizationContextTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update UnitTests.NonParallelizable.csproj Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update unit-tests.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update ConfigurationMangerTests.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Fix SynchronizationContextTests: use modern instance model (Application.Create) instead of legacy Application.Init Co-authored-by: tig <585482+tig@users.noreply.github.com> Agent-Logs-Url: https://github.com/gui-cs/Terminal.Gui/sessions/14639665-ebd0-43e0-a118-e5139cc6478e --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: tig <585482+tig@users.noreply.github.com> Co-authored-by: Tig <tig@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
CI/CD Workflows
The repository uses multiple GitHub Actions workflows. What runs and when:
Note: Tests use xUnit v3 with Microsoft Testing Platform (MTP). The test runner is configured in
global.jsonvia"test": { "runner": "Microsoft.Testing.Platform" }. MTP runs test projects as standalone executables, so each OS must build its own binaries.
1) Build Validation (.github/workflows/build-validation.yml)
- Triggers: push and pull_request to
v2_release,v2_develop(ignores**.md) - Runner/timeout:
ubuntu-latest, 10 minutes - Steps:
- Checkout and setup .NET 10.x GA
dotnet restore- Build Debug:
dotnet build --configuration Debug --no-restore -property:NoWarn=0618%3B0612 - Build Release (library):
dotnet build Terminal.Gui/Terminal.Gui.csproj --configuration Release --no-incremental --force -property:NoWarn=0618%3B0612 - Pack Release:
dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages -property:NoWarn=0618%3B0612 - Restore NativeAot/SelfContained examples, then restore solution again
- Build Release for
Examples/NativeAotandExamples/SelfContained - Build Release solution
2) Build & Run Unit Tests (.github/workflows/unit-tests.yml)
- Triggers: push and pull_request to
v2_release,v2_develop(ignores**.md) - Matrix: Ubuntu/Windows/macOS
- Timeout: 15 minutes (non-parallel), 60 minutes (parallel)
- Process:
- Each OS checks out code, restores, and builds locally
- Performance optimizations:
- Disables Windows Defender on Windows runners (significant speedup)
- Runs three test jobs:
- Non-parallel UnitTests.Legacy:
Tests/UnitTests.Legacywith diagnostic output - Non-parallel UnitTests.NonParallelizable:
Tests/UnitTests.NonParallelizablewith diagnostic output - Parallel UnitTestsParallelizable:
Tests/UnitTestsParallelizablewith diagnostic output
- Non-parallel UnitTests.Legacy:
- Uploads test logs and diagnostic data from all runners
Test results: All tests output to unified TestResults/ directory at repository root
3) Build & Run Integration Tests (.github/workflows/integration-tests.yml)
- Triggers: push and pull_request to
v2_release,v2_develop(ignores**.md) - Matrix: Ubuntu/Windows/macOS
- Timeout: 15 minutes
- Process:
- Each OS checks out code, restores, and builds locally
- Performance optimizations:
- Disables Windows Defender on Windows runners
- Runs IntegrationTests with diagnostic output
- Uploads logs per-OS
4) Create Release (.github/workflows/release.yml)
- Triggers:
workflow_dispatch(manual trigger from GitHub Actions UI) - Inputs:
release_type: Choose fromprealpha,alpha,beta,rc, orstableversion_override: (Optional) Specify exact version number, otherwise GitVersion calculates it
- Process:
- Checks out
v2_releasebranch - Determines version using GitVersion or override
- Creates annotated git tag (e.g.,
v2.0.0-prealphaorv2.0.0) - Creates release commit with message
- Pushes tag and commit to repository
- Creates GitHub Release (marked as pre-release if not stable)
- Automatically triggers publish workflow (see below)
- Checks out
- Purpose: Automates the release process to prevent manual errors
5) Publish to NuGet (.github/workflows/publish.yml)
- Triggers: push to
v2_release,v2_develop, and tagsv*(ignores**.md) - Uses GitVersion to compute SemVer, builds Release, packs with symbols, and pushes to NuGet.org using
NUGET_API_KEY - Automatically triggered by the Create Release workflow when a new tag is pushed
- Additional actions on v2_release branch:
- Delists old NuGet packages to keep package list clean:
- Keeps only the most recent
2.0.0-develop.*package - Keeps only the just-published
2.0.0-alpha.*or2.0.0-beta.*package
- Keeps only the most recent
- Triggers Terminal.Gui.templates repository update via repository_dispatch (requires
PAT_FOR_TEMPLATESsecret)
- Delists old NuGet packages to keep package list clean:
6) Build and publish API docs (.github/workflows/api-docs.yml)
- Triggers: push to
v1_releaseandv2_develop - Builds DocFX site on Windows and deploys to GitHub Pages when
ref_nameisv2_releaseorv2_develop
Replicating CI Locally
# Full CI sequence:
dotnet restore
dotnet build --configuration Debug --no-restore
dotnet test --project Tests/UnitTests.Legacy --no-build --verbosity normal
dotnet test --project Tests/UnitTests.NonParallelizable --no-build --verbosity normal
dotnet test --project Tests/UnitTestsParallelizable --no-build --verbosity normal
dotnet build --configuration Release --no-restore