File tree Expand file tree Collapse file tree
src/ElectronNET.IntegrationTests Expand file tree Collapse file tree Original file line number Diff line number Diff 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 : |
Original file line number Diff line number Diff line change 11{
22 "$schema" : " https://xunit.net/schema/current/xunit.runner.schema.json" ,
3+ "methodDisplay" : " method" ,
34 "diagnosticMessages" : true ,
45 "parallelizeTestCollections" : false ,
56 "longRunningTestSeconds" : 60
You can’t perform that action at this time.
0 commit comments