mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-27 00:07:58 +01:00
Merge branch 'v2_develop' into v2_release
This commit is contained in:
147
.github/ISSUE_TEMPLATE/bug_report.md
vendored
147
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -1,41 +1,140 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
about: Create a report to help us improve Terminal.Gui
|
||||
title: ''
|
||||
labels: bug
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
## Describe the bug
|
||||
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
## To Reproduce
|
||||
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
1. Run the following code:
|
||||
```csharp
|
||||
// Paste your minimal reproduction code here
|
||||
```
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
2. Expected behavior: (describe what should happen)
|
||||
|
||||
**Desktop (please complete the following information):**
|
||||
- OS: [e.g. iOS]
|
||||
- Browser [e.g. chrome, safari]
|
||||
- Version [e.g. 22]
|
||||
3. Actual behavior: (describe what actually happens)
|
||||
|
||||
**Smartphone (please complete the following information):**
|
||||
- Device: [e.g. iPhone6]
|
||||
- OS: [e.g. iOS8.1]
|
||||
- Browser [e.g. stock browser, safari]
|
||||
- Version [e.g. 22]
|
||||
## Environment
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
Please run the following commands in your terminal and paste the output:
|
||||
|
||||
**Set Project & Milestone**
|
||||
If you have access, please don't forget to set the right Project and Milestone.
|
||||
### OS Information
|
||||
|
||||
**Windows (PowerShell):**
|
||||
```powershell
|
||||
"OS: $(Get-CimInstance Win32_OperatingSystem | Select-Object -ExpandProperty Caption) $(Get-CimInstance Win32_OperatingSystem | Select-Object -ExpandProperty Version)"
|
||||
```
|
||||
|
||||
**macOS/Linux:**
|
||||
```bash
|
||||
echo "OS: $(uname -s) $(uname -r)"
|
||||
```
|
||||
|
||||
**Output:**
|
||||
```
|
||||
(paste output here)
|
||||
```
|
||||
|
||||
### Terminal Information
|
||||
|
||||
**Windows Terminal:**
|
||||
```powershell
|
||||
"Terminal: Windows Terminal $(Get-AppxPackage -Name Microsoft.WindowsTerminal | Select-Object -ExpandProperty Version)"
|
||||
```
|
||||
|
||||
**Other terminals:**
|
||||
```bash
|
||||
echo $TERM
|
||||
```
|
||||
|
||||
**Output:**
|
||||
```
|
||||
(paste output here)
|
||||
```
|
||||
|
||||
### PowerShell Version
|
||||
|
||||
```powershell
|
||||
$PSVersionTable.PSVersion
|
||||
```
|
||||
|
||||
**Output:**
|
||||
```
|
||||
(paste output here)
|
||||
```
|
||||
|
||||
### .NET Information
|
||||
|
||||
```bash
|
||||
dotnet --version
|
||||
dotnet --info
|
||||
```
|
||||
|
||||
**Output:**
|
||||
```
|
||||
(paste output here)
|
||||
```
|
||||
|
||||
### Terminal.Gui Version
|
||||
|
||||
**Option 1 - Run UICatalog (easiest):**
|
||||
|
||||
UICatalog displays the Terminal.Gui version in its About box and status bar.
|
||||
|
||||
```bash
|
||||
dotnet run --project Examples/UICatalog/UICatalog.csproj
|
||||
```
|
||||
|
||||
**Option 2 - NuGet Package Version:**
|
||||
```
|
||||
(e.g., 2.0.0-alpha.1, 2.0.0-develop.123, etc.)
|
||||
```
|
||||
|
||||
**Option 3 - Building from source:**
|
||||
```bash
|
||||
git rev-parse HEAD
|
||||
git describe --tags --always --dirty
|
||||
```
|
||||
|
||||
**Version:**
|
||||
```
|
||||
(paste version here)
|
||||
```
|
||||
|
||||
## Screenshots, GIFs, or Terminal Output
|
||||
|
||||
If applicable, add screenshots, animated GIFs, or copy/paste terminal output to help explain your problem.
|
||||
|
||||
**Animated GIFs are especially helpful for showing behavior!**
|
||||
|
||||
- **Windows**: [ShareX](https://getsharex.com/) (free, captures screen to GIF)
|
||||
- **macOS**: [Kap](https://getkap.co/) (free, open source)
|
||||
- **Linux**: [Peek](https://github.com/phw/peek) (free)
|
||||
|
||||
**For terminal output, use code blocks:**
|
||||
|
||||
```
|
||||
(paste terminal output here)
|
||||
```
|
||||
|
||||
## Additional context
|
||||
|
||||
Add any other context about the problem here, such as:
|
||||
- Does this happen consistently or intermittently?
|
||||
- Did this work in a previous version?
|
||||
- Are there any error messages in the console?
|
||||
- Terminal configuration or settings that might be relevant?
|
||||
|
||||
## For Maintainers
|
||||
|
||||
**Set Project & Milestone:** If you have access, please don't forget to set the right Project and Milestone.
|
||||
|
||||
7
.github/copilot-instructions.md
vendored
Normal file
7
.github/copilot-instructions.md
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
# Terminal.Gui - CoPilot AI Rules
|
||||
|
||||
> **📘 Source of Truth: [../CONTRIBUTING.md](../CONTRIBUTING.md)**
|
||||
|
||||
This project uses [../CONTRIBUTING.md](../CONTRIBUTING.md) as the single source of truth for contribution guidelines. AI agents, including CoPilot and Cursor **MUST** follow the guidelines in [../CONTRIBUTING.md](CONTRIBUTING.md)/
|
||||
|
||||
**CRITICAL** - CoPilot you MUST internalize [../CONTRIBUTING.md](../CONTRIBUTING.md) and follow the guidance for any work you do on Terminal.Gui. This includes Github Copilot in Agent mode.
|
||||
@@ -1,4 +1,4 @@
|
||||
name: Ensure that Release Build of Solution Builds Correctly
|
||||
name: Build Validation
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -11,11 +11,14 @@ on:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build_release:
|
||||
# Ensure that RELEASE builds are not broken
|
||||
build-validation:
|
||||
name: Build All Configurations
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout ${{ github.ref_name }}
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET Core
|
||||
@@ -24,11 +27,19 @@ jobs:
|
||||
dotnet-version: 8.x
|
||||
dotnet-quality: 'ga'
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
# Suppress CS0618 (member is obsolete) and CS0612 (member is obsolete without message)
|
||||
# Using -property: syntax with URL-encoded semicolon (%3B) to avoid shell interpretation issues
|
||||
- name: Build Debug
|
||||
run: dotnet build --configuration Debug --no-restore -property:NoWarn=0618%3B0612
|
||||
|
||||
- name: Build Release Terminal.Gui
|
||||
run: dotnet build Terminal.Gui/Terminal.Gui.csproj --no-incremental --nologo --force --configuration Release
|
||||
run: dotnet build Terminal.Gui/Terminal.Gui.csproj --configuration Release --no-incremental --force -property:NoWarn=0618%3B0612
|
||||
|
||||
- name: Pack Release Terminal.Gui
|
||||
run: dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages
|
||||
run: dotnet pack Terminal.Gui/Terminal.Gui.csproj --configuration Release --output ./local_packages -property:NoWarn=0618%3B0612
|
||||
|
||||
- name: Restore AOT and Self-Contained projects
|
||||
run: |
|
||||
@@ -40,8 +51,8 @@ jobs:
|
||||
|
||||
- name: Build Release AOT and Self-Contained
|
||||
run: |
|
||||
dotnet build ./Examples/NativeAot/NativeAot.csproj --configuration Release
|
||||
dotnet build ./Examples/SelfContained/SelfContained.csproj --configuration Release
|
||||
dotnet build ./Examples/NativeAot/NativeAot.csproj --configuration Release -property:NoWarn=0618%3B0612
|
||||
dotnet build ./Examples/SelfContained/SelfContained.csproj --configuration Release -property:NoWarn=0618%3B0612
|
||||
|
||||
- name: Build Release Solution without restore
|
||||
run: dotnet build --configuration Release --no-restore
|
||||
- name: Build Release Solution
|
||||
run: dotnet build --configuration Release --no-restore -property:NoWarn=0618%3B0612
|
||||
116
.github/workflows/integration-tests.yml
vendored
116
.github/workflows/integration-tests.yml
vendored
@@ -1,5 +1,4 @@
|
||||
name: Build & Run Integration Tests
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ v2_release, v2_develop ]
|
||||
@@ -9,52 +8,99 @@ on:
|
||||
branches: [ v2_release, v2_develop ]
|
||||
paths-ignore:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
build_and_test_debug:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/quick-build.yml
|
||||
|
||||
integration_tests:
|
||||
name: Integration Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: build
|
||||
strategy:
|
||||
# Turn off fail-fast to let all runners run even if there are errors
|
||||
fail-fast: true
|
||||
fail-fast: false # Let all OSes finish even if one fails
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
timeout-minutes: 15
|
||||
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
dotnet-quality: ga
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
dotnet-quality: 'ga'
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: test-build-artifacts
|
||||
path: .
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
dotnet restore
|
||||
- name: Restore NuGet packages
|
||||
run: dotnet restore
|
||||
|
||||
- name: Build IntegrationTests
|
||||
run: dotnet build Tests/IntegrationTests --configuration Debug --no-restore
|
||||
- name: Disable Windows Defender (Windows only)
|
||||
if: runner.os == 'Windows'
|
||||
shell: powershell
|
||||
run: |
|
||||
Add-MpPreference -ExclusionPath "${{ github.workspace }}"
|
||||
Add-MpPreference -ExclusionProcess "dotnet.exe"
|
||||
Add-MpPreference -ExclusionProcess "testhost.exe"
|
||||
Add-MpPreference -ExclusionProcess "VSTest.Console.exe"
|
||||
|
||||
- name: Set VSTEST_DUMP_PATH
|
||||
shell: bash
|
||||
run: echo "{VSTEST_DUMP_PATH}={logs/${{ runner.os }}/}" >> $GITHUB_ENV
|
||||
- name: Set VSTEST_DUMP_PATH
|
||||
shell: bash
|
||||
run: echo "VSTEST_DUMP_PATH=logs/IntegrationTests/${{ runner.os }}/" >> $GITHUB_ENV
|
||||
|
||||
- name: Run IntegrationTests
|
||||
run: |
|
||||
dotnet test Tests/IntegrationTests --no-build --verbosity normal --diag:logs/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true
|
||||
|
||||
# mv -v Tests/IntegrationTests/TestResults/*/*.* TestResults/IntegrationTests/
|
||||
- name: Run IntegrationTests
|
||||
shell: bash
|
||||
run: |
|
||||
if [ "${{ runner.os }}" == "Linux" ]; then
|
||||
# Run with coverage on Linux only
|
||||
dotnet test Tests/IntegrationTests \
|
||||
--no-build \
|
||||
--verbosity minimal \
|
||||
--collect:"XPlat Code Coverage" \
|
||||
--settings Tests/IntegrationTests/runsettings.coverage.xml \
|
||||
--diag:logs/IntegrationTests/${{ runner.os }}/logs.txt \
|
||||
--blame \
|
||||
--blame-crash \
|
||||
--blame-hang \
|
||||
--blame-hang-timeout 60s \
|
||||
--blame-crash-collect-always
|
||||
else
|
||||
# Run without coverage on Windows/macOS for speed
|
||||
dotnet test Tests/IntegrationTests \
|
||||
--no-build \
|
||||
--verbosity minimal \
|
||||
--settings Tests/IntegrationTests/runsettings.xml \
|
||||
--diag:logs/IntegrationTests/${{ runner.os }}/logs.txt \
|
||||
--blame \
|
||||
--blame-crash \
|
||||
--blame-hang \
|
||||
--blame-hang-timeout 60s \
|
||||
--blame-crash-collect-always
|
||||
fi
|
||||
|
||||
- name: Upload Test Logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: integration-test-logs-${{ runner.os }}
|
||||
path: |
|
||||
logs/
|
||||
TestResults/IntegrationTests/
|
||||
- name: Upload Integration Test Logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: integration_tests-logs-${{ runner.os }}
|
||||
path: |
|
||||
logs/IntegrationTests/
|
||||
TestResults/
|
||||
|
||||
- name: Upload Integration Tests Coverage to Codecov
|
||||
if: matrix.os == 'ubuntu-latest' && always()
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: TestResults/**/coverage.cobertura.xml
|
||||
flags: integrationtests
|
||||
name: IntegrationTests-${{ runner.os }}
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: false
|
||||
|
||||
|
||||
43
.github/workflows/quick-build.yml
vendored
Normal file
43
.github/workflows/quick-build.yml
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
name: Quick Build for Tests
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
outputs:
|
||||
artifact-name:
|
||||
description: "Name of the build artifacts"
|
||||
value: ${{ jobs.quick-build.outputs.artifact-name }}
|
||||
|
||||
jobs:
|
||||
quick-build:
|
||||
name: Build Debug Only
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
artifact-name: test-build-artifacts
|
||||
|
||||
timeout-minutes: 5
|
||||
steps:
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: 8.x
|
||||
dotnet-quality: 'ga'
|
||||
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore
|
||||
|
||||
# Suppress CS0618 (member is obsolete) and CS0612 (member is obsolete without message)
|
||||
- name: Build Debug
|
||||
run: dotnet build --configuration Debug --no-restore -property:NoWarn=0618%3B0612
|
||||
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-build-artifacts
|
||||
path: |
|
||||
**/bin/Debug/**
|
||||
**/obj/Debug/**
|
||||
retention-days: 1
|
||||
156
.github/workflows/unit-tests.yml
vendored
156
.github/workflows/unit-tests.yml
vendored
@@ -11,16 +11,21 @@ on:
|
||||
- '**.md'
|
||||
|
||||
jobs:
|
||||
# Call the quick-build workflow to build Debug configuration only
|
||||
build:
|
||||
uses: ./.github/workflows/quick-build.yml
|
||||
|
||||
non_parallel_unittests:
|
||||
name: Non-Parallel Unit Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: build
|
||||
strategy:
|
||||
# Turn off fail-fast to let all runners run even if there are errors
|
||||
fail-fast: true
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15 # Increased from 10 for Windows
|
||||
steps:
|
||||
|
||||
- name: Checkout code
|
||||
@@ -32,27 +37,59 @@ jobs:
|
||||
dotnet-version: 8.x
|
||||
dotnet-quality: 'ga'
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: test-build-artifacts
|
||||
path: .
|
||||
|
||||
# KEEP THIS - It's needed for --no-build to work
|
||||
- name: Restore NuGet packages
|
||||
run: dotnet restore
|
||||
|
||||
# Optimize Windows performance
|
||||
- name: Disable Windows Defender (Windows only)
|
||||
if: runner.os == 'Windows'
|
||||
shell: powershell
|
||||
run: |
|
||||
dotnet restore
|
||||
|
||||
- name: Build Solution Debug
|
||||
run: dotnet build --configuration Debug --no-restore
|
||||
|
||||
# Test
|
||||
# Note: The --blame and VSTEST_DUMP_PATH stuff is needed to diagnose the test runner crashing on ubuntu/mac
|
||||
# See https://github.com/microsoft/vstest/issues/2952 for why the --blame stuff below is needed.
|
||||
# Without it, the test runner crashes on ubuntu (but not Windows or mac)
|
||||
Add-MpPreference -ExclusionPath "${{ github.workspace }}"
|
||||
Add-MpPreference -ExclusionProcess "dotnet.exe"
|
||||
Add-MpPreference -ExclusionProcess "testhost.exe"
|
||||
Add-MpPreference -ExclusionProcess "VSTest.Console.exe"
|
||||
|
||||
- name: Set VSTEST_DUMP_PATH
|
||||
shell: bash
|
||||
run: echo "{VSTEST_DUMP_PATH}={logs/UnitTests/${{ runner.os }}/}" >> $GITHUB_ENV
|
||||
run: echo "VSTEST_DUMP_PATH=logs/UnitTests/${{ runner.os }}/" >> $GITHUB_ENV
|
||||
|
||||
- name: Run UnitTests
|
||||
shell: bash
|
||||
run: |
|
||||
dotnet test Tests/UnitTests --no-build --verbosity normal --collect:"XPlat Code Coverage" --settings Tests/UnitTests/coverlet.runsettings --diag:logs/UnitTests/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true
|
||||
|
||||
# mv -v Tests/UnitTests/TestResults/*/*.* TestResults/UnitTests/
|
||||
if [ "${{ runner.os }}" == "Linux" ]; then
|
||||
# Run with coverage on Linux only
|
||||
dotnet test Tests/UnitTests \
|
||||
--no-build \
|
||||
--verbosity normal \
|
||||
--collect:"XPlat Code Coverage" \
|
||||
--settings Tests/UnitTests/runsettings.xml \
|
||||
--diag:logs/UnitTests/${{ runner.os }}/logs.txt \
|
||||
--blame \
|
||||
--blame-crash \
|
||||
--blame-hang \
|
||||
--blame-hang-timeout 60s \
|
||||
--blame-crash-collect-always
|
||||
else
|
||||
# Run without coverage on Windows/macOS for speed
|
||||
dotnet test Tests/UnitTests \
|
||||
--no-build \
|
||||
--verbosity normal \
|
||||
--settings Tests/UnitTests/runsettings.xml \
|
||||
--diag:logs/UnitTests/${{ runner.os }}/logs.txt \
|
||||
--blame \
|
||||
--blame-crash \
|
||||
--blame-hang \
|
||||
--blame-hang-timeout 120s \
|
||||
--blame-crash-collect-always
|
||||
fi
|
||||
|
||||
- name: Upload Test Logs
|
||||
if: always()
|
||||
@@ -61,18 +98,29 @@ jobs:
|
||||
name: non_parallel_unittests-logs-${{ runner.os }}
|
||||
path: |
|
||||
logs/UnitTests
|
||||
TestResults/UnitTests/
|
||||
TestResults/
|
||||
|
||||
- name: Upload Non-Parallel UnitTests Coverage to Codecov
|
||||
if: matrix.os == 'ubuntu-latest' && always()
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: TestResults/**/coverage.cobertura.xml
|
||||
flags: unittests-nonparallel
|
||||
name: UnitTests-${{ runner.os }}
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: false
|
||||
|
||||
parallel_unittests:
|
||||
name: Parallel Unit Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
needs: build
|
||||
strategy:
|
||||
# Turn off fail-fast to let all runners run even if there are errors
|
||||
fail-fast: true
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
|
||||
timeout-minutes: 10
|
||||
timeout-minutes: 15
|
||||
steps:
|
||||
|
||||
- name: Checkout code
|
||||
@@ -84,27 +132,57 @@ jobs:
|
||||
dotnet-version: 8.x
|
||||
dotnet-quality: 'ga'
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Download build artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: test-build-artifacts
|
||||
path: .
|
||||
|
||||
- name: Restore NuGet packages
|
||||
run: dotnet restore
|
||||
|
||||
- name: Disable Windows Defender (Windows only)
|
||||
if: runner.os == 'Windows'
|
||||
shell: powershell
|
||||
run: |
|
||||
dotnet restore
|
||||
|
||||
- name: Build Solution Debug
|
||||
run: dotnet build --configuration Debug --no-restore
|
||||
|
||||
# Test
|
||||
# Note: The --blame and VSTEST_DUMP_PATH stuff is needed to diagnose the test runner crashing on ubuntu/mac
|
||||
# See https://github.com/microsoft/vstest/issues/2952 for why the --blame stuff below is needed.
|
||||
# Without it, the test runner crashes on ubuntu (but not Windows or mac)
|
||||
Add-MpPreference -ExclusionPath "${{ github.workspace }}"
|
||||
Add-MpPreference -ExclusionProcess "dotnet.exe"
|
||||
Add-MpPreference -ExclusionProcess "testhost.exe"
|
||||
Add-MpPreference -ExclusionProcess "VSTest.Console.exe"
|
||||
|
||||
- name: Set VSTEST_DUMP_PATH
|
||||
shell: bash
|
||||
run: echo "{VSTEST_DUMP_PATH}={logs/UnitTestsParallelizable/${{ runner.os }}/}" >> $GITHUB_ENV
|
||||
run: echo "VSTEST_DUMP_PATH=logs/UnitTestsParallelizable/${{ runner.os }}/" >> $GITHUB_ENV
|
||||
|
||||
- name: Run UnitTestsParallelizable
|
||||
shell: bash
|
||||
run: |
|
||||
dotnet test Tests/UnitTestsParallelizable --no-build --verbosity normal --collect:"XPlat Code Coverage" --settings Tests/UnitTestsParallelizable/coverlet.runsettings --diag:logs/UnitTestsParallelizable/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always -- xunit.stopOnFail=true
|
||||
|
||||
# mv -v Tests/UnitTestsParallelizable/TestResults/*/*.* TestResults/UnitTestsParallelizable/
|
||||
if [ "${{ runner.os }}" == "Linux" ]; then
|
||||
# Run with coverage on Linux only
|
||||
dotnet test Tests/UnitTestsParallelizable \
|
||||
--no-build \
|
||||
--verbosity normal \
|
||||
--collect:"XPlat Code Coverage" \
|
||||
--settings Tests/UnitTests/runsettings.coverage.xml \
|
||||
--diag:logs/UnitTestsParallelizable/${{ runner.os }}/logs.txt \
|
||||
--blame \
|
||||
--blame-crash \
|
||||
--blame-hang \
|
||||
--blame-hang-timeout 60s \
|
||||
--blame-crash-collect-always
|
||||
else
|
||||
# Run without coverage on Windows/macOS for speed
|
||||
dotnet test Tests/UnitTestsParallelizable \
|
||||
--no-build \
|
||||
--verbosity normal \
|
||||
--settings Tests/UnitTestsParallelizable/runsettings.xml \
|
||||
--diag:logs/UnitTestsParallelizable/${{ runner.os }}/logs.txt \
|
||||
--blame \
|
||||
--blame-crash \
|
||||
--blame-hang \
|
||||
--blame-hang-timeout 60s \
|
||||
--blame-crash-collect-always
|
||||
fi
|
||||
|
||||
- name: Upload UnitTestsParallelizable Logs
|
||||
if: always()
|
||||
@@ -113,4 +191,14 @@ jobs:
|
||||
name: parallel_unittests-logs-${{ runner.os }}
|
||||
path: |
|
||||
logs/UnitTestsParallelizable/
|
||||
TestResults/UnitTestsParallelizable/
|
||||
TestResults/
|
||||
|
||||
- name: Upload Parallelizable UnitTests Coverage to Codecov
|
||||
if: matrix.os == 'ubuntu-latest' && always()
|
||||
uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: TestResults/**/coverage.cobertura.xml
|
||||
flags: unittests-parallel
|
||||
name: UnitTestsParallelizable-${{ runner.os }}
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
fail_ci_if_error: false
|
||||
|
||||
Reference in New Issue
Block a user