mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 15:57:56 +01:00
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); supportsworkflow_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/NativeAotandExamples/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-buildto 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/UnitTestswith blame/diag flags;xunit.stopOnFail=false - Parallel UnitTestsParallelizable:
Tests/UnitTestsParallelizablewith blame/diag flags;xunit.stopOnFail=false
- Non-parallel UnitTests:
- 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 tagsv*(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_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 Tests/UnitTests --no-build --verbosity normal
dotnet test Tests/UnitTestsParallelizable --no-build --verbosity normal
dotnet build --configuration Release --no-restore