mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-26 07:47:54 +01:00
Diagnosing xunit failures in github action on ubuntu/macos (#3593)
* Just ubuntu * windows & ubuntu * commented test out * uncommented test * back to ubuntu * deleted all Views tests * deleted all Views tests * VSTEST_DUMP_PATH * Revert "deleted all Views tests" This reverts commit985f6143e6. * Deleted first half Views tests * Revert "Deleted first half Views tests" This reverts commitbff2484cd7. * Deleted 2nd half Views tests * VSTEST_DUMP_PATH 2 * VSTEST_DUMP_PATH 3 * Revert "Deleted 2nd half Views tests" This reverts commitb1dbd79dc9. * Reapply "Deleted first half Views tests" This reverts commit3e8e890b03. * Revert "Reapply "Deleted first half Views tests"" This reverts commit731b50f392. * ubuntu/mac * removed dupe test * removed dupe test * removed statusbar tests * Revert "removed statusbar tests" This reverts commit889813143b. * Fixed shortcut tests * windows, mac, linux * fail-fast: false temporarily * fail-fast: false temporarily * trying stuff * fixed quote error * fixed sed issue * Skip WindowDispose_CanFocusProblem * Skip SynchronizationContext_CreateCopy * mac * mac * mac * mac * mac * gsed * gsed * gsed * gsed * finally fixed! Hopefully.
This commit is contained in:
40
.github/workflows/dotnet-core.yml
vendored
40
.github/workflows/dotnet-core.yml
vendored
@@ -15,16 +15,18 @@ jobs:
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
# Turn on fail-fast once we have the tests running on all platforms
|
||||
fail-fast: false
|
||||
# Turn off fail-fast to let all runners run even if there are errors
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ windows-latest ]
|
||||
#os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||
|
||||
timeout-minutes: 10
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Build
|
||||
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup .NET Core
|
||||
uses: actions/setup-dotnet@v4
|
||||
@@ -39,31 +41,37 @@ jobs:
|
||||
- name: Build Debug
|
||||
run: dotnet build --configuration Debug --no-restore
|
||||
|
||||
- name: Install sed on macOS and update xunit.runner.json
|
||||
# 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)
|
||||
|
||||
- name: MacOS - Patch test runner settings to stop on fail
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
brew install gnu-sed
|
||||
PATH="/opt/homebrew/opt/gnu-sed/libexec/gnubin:$PATH"
|
||||
sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json
|
||||
brew install gnu-sed
|
||||
gsed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json
|
||||
|
||||
- name: Update xunit.runner.json (Windows/Ubuntu)
|
||||
- name: Windows/Linux - Patch test runner settings to stop on fail
|
||||
if: runner.os != 'macOS'
|
||||
run: |
|
||||
sed -i 's/"stopOnFail": false/"stopOnFail": true/g' UnitTests/xunit.runner.json
|
||||
|
||||
# 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)
|
||||
- name: Set VSTEST_DUMP_PATH
|
||||
shell: bash
|
||||
run: echo "{VSTEST_DUMP_PATH}={logs/${{ runner.os }}/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Test
|
||||
run: |
|
||||
dotnet test --verbosity normal --collect:"XPlat Code Coverage" --settings UnitTests/coverlet.runsettings --diag:logs/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always
|
||||
dotnet test --verbosity normal --collect:"XPlat Code Coverage" --settings UnitTests/coverlet.runsettings --diag:logs/${{ runner.os }}/logs.txt --blame --blame-crash --blame-hang --blame-hang-timeout 60s --blame-crash-collect-always
|
||||
|
||||
# mv -v UnitTests/TestResults/*/*.* UnitTests/TestResults/
|
||||
# mv -v UnitTests/TestResults/*/*.* UnitTests/TestResults/
|
||||
|
||||
- name: Upload Test Logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: test-logs-for-blame-debugging
|
||||
name: test-logs-${{ runner.os }}
|
||||
path: |
|
||||
logs/
|
||||
UnitTests/TestResults/
|
||||
|
||||
Reference in New Issue
Block a user