Skip to content

Commit 2d7cf61

Browse files
committed
erg
1 parent 21508e3 commit 2d7cf61

2 files changed

Lines changed: 34 additions & 1 deletion

File tree

.github/workflows/integration-tests.yml

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ jobs:
113113
with:
114114
path: test-results
115115

116-
# --- CTRF: setup & convert all TRX to CTRF in the aggregate job ---
117116
- name: Setup .NET (for CTRF conversion)
118117
uses: actions/setup-dotnet@v4
119118
with:
@@ -124,6 +123,39 @@ jobs:
124123
dotnet new tool-manifest
125124
dotnet tool install DotnetCtrfJsonReporter --local
126125
126+
- name: Convert TRX → CTRF and clean names (keep suites; set filePath=OS)
127+
shell: bash
128+
run: |
129+
set -euo pipefail
130+
mkdir -p ctrf
131+
shopt -s globstar nullglob
132+
conv=0
133+
strip='ElectronNET\.IntegrationTests\.Tests\.'
134+
for trx in test-results/**/*.trx; do
135+
os="$(basename "$(dirname "$trx")")"
136+
[[ "$os" == "test-results" ]] && os="unknown"
137+
138+
outdir="ctrf/${os}"
139+
mkdir -p "$outdir"
140+
out="${outdir}/ctrf-report.json"
141+
142+
# TRX → CTRF
143+
dotnet tool run DotnetCtrfJsonReporter -p "$trx" -d "$outdir" -f "ctrf-report.json"
144+
145+
# Strip prefix from names; DO NOT touch suite; set filePath to OS
146+
jq --arg os "$os" --arg strip "$strip" -f - "$out" > "${out}.tmp" <<'JQ' && mv "${out}.tmp" "$out"
147+
.results |= map(
148+
(.name |= ((. // "") | sub($strip; ""))) |
149+
(.fullName? |= ((. // "") | sub($strip; ""))) |
150+
(.className?|= ((. // "") | sub($strip; ""))) |
151+
(.filePath = $os)
152+
)
153+
154+
echo "Converted & normalized $trx -> $out"
155+
conv=$((conv+1))
156+
done
157+
echo "Processed $conv TRX file(s)"
158+
127159
- name: Convert TRX → CTRF (per downloaded artifact)
128160
shell: bash
129161
run: |

src/src/ElectronNET.IntegrationTests/xunit.runner.json renamed to src/ElectronNET.IntegrationTests/xunit.runner.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"$schema": "https://xunit.net/schema/current/xunit.runner.schema.json",
3+
"methodDisplay": "method",
34
"diagnosticMessages": true,
45
"parallelizeTestCollections": false,
56
"longRunningTestSeconds": 60

0 commit comments

Comments
 (0)