Skip to content

Commit dc07e1c

Browse files
authored
Add diagnostics steps for Linux and Windows in CI
1 parent f246c68 commit dc07e1c

1 file changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/pull-requests.yaml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,47 @@ jobs:
119119
if: matrix.os == 'ubuntu-latest' && (!cancelled())
120120
with:
121121
files: "${{ github.workspace }}/**/*.trx"
122+
123+
- name: Diagnostics (Linux)
124+
if: matrix.os == 'ubuntu-latest' && failure()
125+
run: |
126+
echo "=== dotnet --info ==="
127+
dotnet --info || true
128+
129+
echo "=== Repo root listing ==="
130+
ls -la || true
131+
132+
echo "=== Check test project obj folder ==="
133+
TEST_OBJ="test/FluentMigrator.Analyzers.Tests/obj"
134+
if [ -d "$TEST_OBJ" ]; then
135+
echo "Found $TEST_OBJ, listing contents (first 500 chars of each file):"
136+
find "$TEST_OBJ" -type f -maxdepth 3 -print -exec sh -c 'echo "---- {} ----"; head -c 500 "{}" || true; echo' \;
137+
else
138+
echo "$TEST_OBJ does not exist"
139+
fi
140+
141+
- name: Diagnostics (Windows)
142+
if: matrix.os == 'windows-latest' && failure()
143+
shell: pwsh
144+
run: |
145+
Write-Host "=== dotnet --info ==="
146+
dotnet --info
147+
148+
Write-Host "=== Repo root listing ==="
149+
Get-ChildItem -Force
150+
151+
$testObj = "test\FluentMigrator.Analyzers.Tests\obj"
152+
Write-Host "=== Check test project obj folder ($testObj) ==="
153+
if (Test-Path $testObj) {
154+
Get-ChildItem $testObj -Recurse -File | ForEach-Object {
155+
Write-Host "---- $($_.FullName) ----"
156+
# show the first ~200 chars/lines safely
157+
try {
158+
Get-Content -Path $_.FullName -TotalCount 40 | ForEach-Object { Write-Host $_ }
159+
} catch {
160+
Write-Host "Unable to dump content of $($_.FullName): $($_.Exception.Message)"
161+
}
162+
}
163+
} else {
164+
Write-Host "$testObj does not exist"
165+
}

0 commit comments

Comments
 (0)