Copilot 0eafb5947e Move parallel test repeat logic to stress tests (#4455) 1 周之前
..
README.md a84b2c4896 Fixes #4419, #4148, #4408 - Toplevel is GONE - Replaced by Runnable (#4422) 1 周之前
api-docs.yml dc0d8f2f85 Fixes #4429 - Timeouts lost (#4430) 1 周之前
build-validation.yml d53fcd7485 Fixes #4374 - Nukes all (?) legacy Driver and Application stuff; revamps tests (#4376) 1 月之前
check-duplicates.yml b0f32811eb Fixes #3930 - Splits tests to `Tests/UnitTests`, `Tests/IntegrationTests`, `Tests/StressTests` (#3954) 9 月之前
codeql-analysis.yml b2bbd42a50 Updated yml 1 年之前
integration-tests.yml d53fcd7485 Fixes #4374 - Nukes all (?) legacy Driver and Application stuff; revamps tests (#4376) 1 月之前
publish.yml 4cff53f49c Fixed release builds 10 6 月之前
quick-build.yml d53fcd7485 Fixes #4374 - Nukes all (?) legacy Driver and Application stuff; revamps tests (#4376) 1 月之前
stress-tests.yml 0eafb5947e Move parallel test repeat logic to stress tests (#4455) 1 周之前
unit-tests.yml 0eafb5947e Move parallel test repeat logic to stress tests (#4455) 1 周之前

README.md

CI/CD Workflows

The repository uses multiple GitHub Actions workflows. What runs and when:

1) Build Solution (.github/workflows/build.yml)

  • Triggers: push and pull_request to v2_release, v2_develop (ignores **.md); supports workflow_call
  • Runner/timeout: ubuntu-latest, 10 minutes
  • Steps:
  • Checkout and setup .NET 8.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/NativeAot and Examples/SelfContained
  • Build Release solution
  • Upload artifacts named build-artifacts, retention 1 day

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 per job
  • Process:
  • Calls build workflow to build solution once
  • Downloads build artifacts
  • Runs dotnet restore (required for --no-build to work)
  • Performance optimizations:
    • Disables Windows Defender on Windows runners (significant speedup)
    • Collects code coverage only on Linux (ubuntu-latest) for performance
    • Windows and macOS skip coverage collection to reduce test time
    • Increased blame-hang-timeout to 120s for Windows/macOS (60s for Linux)
  • Runs two test jobs:
    • Non-parallel UnitTests: Tests/UnitTests with blame/diag flags; xunit.stopOnFail=false
    • Parallel UnitTestsParallelizable: Tests/UnitTestsParallelizable with blame/diag flags; xunit.stopOnFail=false
  • Uploads test logs and diagnostic data from all runners
  • Uploads code coverage to Codecov only from Linux runner

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:
  • Calls build workflow
  • Downloads build artifacts
  • Runs dotnet restore
  • Performance optimizations (same as unit tests):
    • Disables Windows Defender on Windows runners
    • Collects code coverage only on Linux
    • Increased blame-hang-timeout to 120s for Windows/macOS
  • Runs IntegrationTests with blame/diag flags; xunit.stopOnFail=true
  • Uploads logs per-OS
  • Uploads coverage to Codecov only from Linux runner

4) Publish to NuGet (.github/workflows/publish.yml)

  • Triggers: push to v2_release, v2_develop, and tags v*(ignores **.md)
  • Uses GitVersion to compute SemVer, builds Release, packs with symbols, and pushes to NuGet.org using NUGET_API_KEY

5) Build and publish API docs (.github/workflows/api-docs.yml)

  • Triggers: push to v1_release and v2_develop
  • Builds DocFX site on Windows and deploys to GitHub Pages when ref_name is v2_release or v2_develop

Replicating CI Locally

# Full CI sequence:
dotnet restore
dotnet build --configuration Debug --no-restore
dotnet test Tests/UnitTests --no-build --verbosity normal
dotnet test Tests/UnitTestsParallelizable --no-build --verbosity normal
dotnet build --configuration Release --no-restore