@@ -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,51 +40,69 @@ 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-* ) RID=linux-x64 ;;
48+ windows-* ) RID=win-x64 ;;
49+ macos-* ) RID=osx-arm64 ;;
50+ * ) echo "Unknown OS ${{ matrix.os }}"; exit 1 ;;
51+ esac
52+ echo "RID=$RID" >> $GITHUB_ENV
53+ echo "Using RID=$RID"
54+
4855 - name : Restore
49- run : dotnet restore -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
56+ run : dotnet restore -r $RID -p:RuntimeIdentifier=$RID -p:ElectronVersion=$ {{ matrix.electronVersion }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
5057
5158 - name : Build
52- run : dotnet build --no-restore -c Release -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
59+ run : dotnet build --no-restore -c Release -r $RID -p:RuntimeIdentifier=$RID -p:ElectronVersion=$ {{ matrix.electronVersion }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
5360
5461 - name : Install Linux GUI dependencies
5562 if : runner.os == 'Linux'
5663 run : |
5764 set -e
5865 sudo apt-get update
59- # Core Electron dependencies
66+ . /etc/os-release
67+ if [ "$VERSION_ID" = "24.04" ]; then
68+ ALSA_PKG=libasound2t64
69+ else
70+ ALSA_PKG=libasound2
71+ fi
72+ echo "Selecting ALSA package: $ALSA_PKG for Ubuntu $VERSION_ID"
6073 sudo apt-get install -y xvfb \
61- libgtk-3-0 libnss3 libgdk-pixbuf-2.0-0 libdrm2 libgbm1 libxss1 libxtst6 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libx11-xcb1 libasound2t64
74+ libgtk-3-0 libnss3 libgdk-pixbuf-2.0-0 libdrm2 libgbm1 libxss1 libxtst6 libatk-bridge2.0-0 libatk1.0-0 libatspi2.0-0 libx11-xcb1 "$ALSA_PKG"
6275
6376 - name : Run tests (Linux)
6477 if : runner.os == 'Linux'
6578 continue-on-error : true
6679 run : |
67- mkdir -p test-results/Ubuntu
80+ mkdir -p test-results
6881 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" \
82+ -c Release --no-build -r $RID -p:RuntimeIdentifier=$RID -p:ElectronVersion=$ {{ matrix.electronVersion }} \
83+ --logger "trx;LogFileName=${{ runner.os }}-electron-${{ matrix.electronVersion }} .trx" \
7184 --logger "console;verbosity=detailed" \
7285 --results-directory test-results
7386
7487 - name : Run tests (Windows)
7588 if : runner.os == 'Windows'
7689 continue-on-error : true
7790 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
91+ New-Item -ItemType Directory -Force -Path test-results | Out-Null
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
8093
8194 - name : Run tests (macOS)
8295 if : runner.os == 'macOS'
8396 continue-on-error : true
8497 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
98+ mkdir -p test-results
99+ 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
87100
88101 - name : Upload raw test results
89102 if : always()
90103 uses : actions/upload-artifact@v4
91104 with :
92- name : test-results-${{ matrix.os }}
105+ name : test-results-${{ matrix.os }}-electron-${{ matrix.electronVersion }}
93106 path : test-results/*.trx
94107 retention-days : 7
95108
@@ -121,23 +134,25 @@ jobs:
121134 dotnet new tool-manifest
122135 dotnet tool install DotnetCtrfJsonReporter --local
123136
124- - name : Convert TRX → CTRF and clean names (keep suites; set filePath=OS)
137+ - name : Convert TRX → CTRF and clean names (filePath=OS|Electron X.Y.Z )
125138 shell : bash
126139 run : |
127140 set -euo pipefail
128141 mkdir -p ctrf
129142 shopt -s globstar nullglob
130143 conv=0
131144 for trx in test-results/**/*.trx; do
132- fname="$(basename "$trx")"
133- os="${fname%.trx}"
134- outdir="ctrf/${os}"
145+ base="$(basename "$trx" .trx)" # e.g. Windows-electron-30.4.0
146+ os="${base%%-electron-*}"
147+ electron="${base#*-electron-}"
148+ label="$os|Electron $electron"
149+ outdir="ctrf/${label}"
135150 mkdir -p "$outdir"
136151 out="${outdir}/ctrf-report.json"
137152
138153 dotnet tool run DotnetCtrfJsonReporter -p "$trx" -d "$outdir" -f "ctrf-report.json"
139154
140- jq --arg os "$os " '.results.tests |= map(.filePath = $os )' "$out" > "${out}.tmp" && mv "${out}.tmp" "$out"
155+ jq --arg fp "$label " '.results.tests |= map(.filePath = $fp )' "$out" > "${out}.tmp" && mv "${out}.tmp" "$out"
141156
142157 echo "Converted & normalized $trx -> $out"
143158 conv=$((conv+1))
0 commit comments