@@ -12,18 +12,13 @@ concurrency:
1212
1313jobs :
1414 tests :
15- name : Integration Tests (${{ matrix.os }})
15+ name : Integration Tests (${{ matrix.os }} / Electron ${{ matrix.electronVersion }} )
1616 runs-on : ${{ matrix.os }}
1717 strategy :
1818 fail-fast : false
1919 matrix :
20- include :
21- - os : ubuntu-24.04
22- rid : linux-x64
23- - os : windows-2022
24- rid : win-x64
25- - os : macos-14
26- rid : osx-arm64
20+ os : [ubuntu-22.04, ubuntu-24.04, windows-2022, windows-2025, macos-14, macos-26]
21+ electronVersion : ['30.4.0', '38.2.2']
2722
2823 env :
2924 DOTNET_SKIP_FIRST_TIME_EXPERIENCE : 1
@@ -45,11 +40,22 @@ jobs:
4540 with :
4641 node-version : ' 22'
4742
43+ - name : Set RID (derived from OS)
44+ shell : bash
45+ run : |
46+ case "${{ matrix.os }}" in
47+ ubuntu-* ) echo "RID=linux-x64" >> $GITHUB_ENV ;;
48+ windows-* ) echo "RID=win-x64" >> $GITHUB_ENV ;;
49+ macos-* ) echo "RID=osx-arm64" >> $GITHUB_ENV ;;
50+ * ) echo "Unknown OS ${{ matrix.os }}"; exit 1 ;;
51+ esac
52+ echo "Using RID=$RID"
53+
4854 - name : Restore
49- run : dotnet restore -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
55+ run : dotnet restore -r $RID -p:RuntimeIdentifier=$RID -p:ElectronVersion=$ {{ matrix.electronVersion }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
5056
5157 - name : Build
52- run : dotnet build --no-restore -c Release -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
58+ run : dotnet build --no-restore -c Release -r $RID -p:RuntimeIdentifier=$RID -p:ElectronVersion=$ {{ matrix.electronVersion }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
5359
5460 - name : Install Linux GUI dependencies
5561 if : runner.os == 'Linux'
@@ -64,32 +70,32 @@ jobs:
6470 if : runner.os == 'Linux'
6571 continue-on-error : true
6672 run : |
67- mkdir -p test-results/Ubuntu
73+ mkdir -p test-results
6874 xvfb-run -a dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj \
69- -c Release --no-build -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} \
70- --logger "trx;LogFileName=Ubuntu .trx" \
75+ -c Release --no-build -r $RID -p:RuntimeIdentifier=$RID -p:ElectronVersion=$ {{ matrix.electronVersion }} \
76+ --logger "trx;LogFileName=${{ runner.os }}-electron-${{ matrix.electronVersion }} .trx" \
7177 --logger "console;verbosity=detailed" \
7278 --results-directory test-results
7379
7480 - name : Run tests (Windows)
7581 if : runner.os == 'Windows'
7682 continue-on-error : true
7783 run : |
78- New-Item -ItemType Directory -Force -Path test-results/Windows | Out-Null
79- dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj -c Release --no-build -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} --logger "trx;LogFileName=Windows .trx" --logger "console;verbosity=detailed" --results-directory test-results
84+ New-Item -ItemType Directory -Force -Path test-results | Out-Null
85+ dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj -c Release --no-build -r $RID -p:RuntimeIdentifier=$RID -p:ElectronVersion=$ {{ matrix.electronVersion }} --logger "trx;LogFileName=${{ runner.os }}-electron-${{ matrix.electronVersion }} .trx" --logger "console;verbosity=detailed" --results-directory test-results
8086
8187 - name : Run tests (macOS)
8288 if : runner.os == 'macOS'
8389 continue-on-error : true
8490 run : |
85- mkdir -p test-results/macOS
86- dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj -c Release --no-build -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} --logger "trx;LogFileName=macOS .trx" --logger "console;verbosity=detailed" --results-directory test-results
91+ mkdir -p test-results
92+ dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj -c Release --no-build -r $RID -p:RuntimeIdentifier=$RID -p:ElectronVersion=$ {{ matrix.electronVersion }} --logger "trx;LogFileName=${{ runner.os }}-electron-${{ matrix.electronVersion }} .trx" --logger "console;verbosity=detailed" --results-directory test-results
8793
8894 - name : Upload raw test results
8995 if : always()
9096 uses : actions/upload-artifact@v4
9197 with :
92- name : test-results-${{ matrix.os }}
98+ name : test-results-${{ matrix.os }}-electron-${{ matrix.electronVersion }}
9399 path : test-results/*.trx
94100 retention-days : 7
95101
@@ -121,23 +127,25 @@ jobs:
121127 dotnet new tool-manifest
122128 dotnet tool install DotnetCtrfJsonReporter --local
123129
124- - name : Convert TRX → CTRF and clean names (keep suites; set filePath=OS)
130+ - name : Convert TRX → CTRF and clean names (filePath=OS|Electron X.Y.Z )
125131 shell : bash
126132 run : |
127133 set -euo pipefail
128134 mkdir -p ctrf
129135 shopt -s globstar nullglob
130136 conv=0
131137 for trx in test-results/**/*.trx; do
132- fname="$(basename "$trx")"
133- os="${fname%.trx}"
134- outdir="ctrf/${os}"
138+ base="$(basename "$trx" .trx)" # e.g. Windows-electron-30.4.0
139+ os="${base%%-electron-*}"
140+ electron="${base#*-electron-}"
141+ label="$os|Electron $electron"
142+ outdir="ctrf/${label}"
135143 mkdir -p "$outdir"
136144 out="${outdir}/ctrf-report.json"
137145
138146 dotnet tool run DotnetCtrfJsonReporter -p "$trx" -d "$outdir" -f "ctrf-report.json"
139147
140- jq --arg os "$os " '.results.tests |= map(.filePath = $os )' "$out" > "${out}.tmp" && mv "${out}.tmp" "$out"
148+ jq --arg fp "$label " '.results.tests |= map(.filePath = $fp )' "$out" > "${out}.tmp" && mv "${out}.tmp" "$out"
141149
142150 echo "Converted & normalized $trx -> $out"
143151 conv=$((conv+1))
0 commit comments