Skip to content

Commit 4de7760

Browse files
authored
Merge pull request #948 from softworkz/submit_extend_test_matrix
CI Tests: Extend matrix - 6 runners and 2 Electron versions
2 parents 1d554fd + 41d9f0a commit 4de7760

File tree

1 file changed

+30
-21
lines changed

1 file changed

+30
-21
lines changed

.github/workflows/integration-tests.yml

Lines changed: 30 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,24 @@ concurrency:
1212

1313
jobs:
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+
os: [ubuntu-22.04, ubuntu-24.04, windows-2022, windows-2025, macos-14, macos-26]
21+
electronVersion: ['30.4.0', '38.2.2']
2022
include:
23+
- os: ubuntu-22.04
24+
rid: linux-x64
2125
- os: ubuntu-24.04
2226
rid: linux-x64
2327
- os: windows-2022
2428
rid: win-x64
29+
- os: windows-2025
30+
rid: win-x64
31+
- os: macos-14
32+
rid: osx-arm64
2533
- os: macos-26
2634
rid: osx-arm64
2735

@@ -46,50 +54,52 @@ jobs:
4654
node-version: '22'
4755

4856
- name: Restore
49-
run: dotnet restore -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
57+
run: dotnet restore -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} -p:ElectronVersion=${{ matrix.electronVersion }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
5058

5159
- name: Build
52-
run: dotnet build --no-restore -c Release -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
60+
run: dotnet build --no-restore -c Release -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} -p:ElectronVersion=${{ matrix.electronVersion }} src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj
5361

5462
- name: Install Linux GUI dependencies
5563
if: runner.os == 'Linux'
5664
run: |
5765
set -e
5866
sudo apt-get update
59-
# Core Electron dependencies
67+
. /etc/os-release
68+
if [ "$VERSION_ID" = "24.04" ]; then ALSA_PKG=libasound2t64; else ALSA_PKG=libasound2; fi
69+
echo "Using ALSA package: $ALSA_PKG"
6070
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
71+
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"
6272
6373
- name: Run tests (Linux)
6474
if: runner.os == 'Linux'
6575
continue-on-error: true
6676
run: |
67-
mkdir -p test-results/Ubuntu
77+
mkdir -p test-results
6878
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" \
79+
-c Release --no-build -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} -p:ElectronVersion=${{ matrix.electronVersion }} \
80+
--logger "trx;LogFileName=${{ matrix.os }}-electron-${{ matrix.electronVersion }}.trx" \
7181
--logger "console;verbosity=detailed" \
7282
--results-directory test-results
7383
7484
- name: Run tests (Windows)
7585
if: runner.os == 'Windows'
7686
continue-on-error: true
7787
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
88+
New-Item -ItemType Directory -Force -Path test-results | Out-Null
89+
dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj -c Release --no-build -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} -p:ElectronVersion=${{ matrix.electronVersion }} --logger "trx;LogFileName=${{ matrix.os }}-electron-${{ matrix.electronVersion }}.trx" --logger "console;verbosity=detailed" --results-directory test-results
8090
8191
- name: Run tests (macOS)
8292
if: runner.os == 'macOS'
8393
continue-on-error: true
8494
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
95+
mkdir -p test-results
96+
dotnet test src/ElectronNET.IntegrationTests/ElectronNET.IntegrationTests.csproj -c Release --no-build -r ${{ matrix.rid }} -p:RuntimeIdentifier=${{ matrix.rid }} -p:ElectronVersion=${{ matrix.electronVersion }} --logger "trx;LogFileName=${{ matrix.os }}-electron-${{ matrix.electronVersion }}.trx" --logger "console;verbosity=detailed" --results-directory test-results
8797
8898
- name: Upload raw test results
8999
if: always()
90100
uses: actions/upload-artifact@v4
91101
with:
92-
name: test-results-${{ matrix.os }}
102+
name: test-results-${{ matrix.os }}-electron-${{ matrix.electronVersion }}
93103
path: test-results/*.trx
94104
retention-days: 7
95105

@@ -121,23 +131,25 @@ jobs:
121131
dotnet new tool-manifest
122132
dotnet tool install DotnetCtrfJsonReporter --local
123133
124-
- name: Convert TRX → CTRF and clean names (keep suites; set filePath=OS)
134+
- name: Convert TRX → CTRF and clean names (filePath=OS|Electron X.Y.Z)
125135
shell: bash
126136
run: |
127137
set -euo pipefail
128138
mkdir -p ctrf
129139
shopt -s globstar nullglob
130140
conv=0
131141
for trx in test-results/**/*.trx; do
132-
fname="$(basename "$trx")"
133-
os="${fname%.trx}"
134-
outdir="ctrf/${os}"
142+
base="$(basename "$trx" .trx)" # e.g. ubuntu-22.04-electron-30.4.0
143+
os="${base%%-electron-*}"
144+
electron="${base#*-electron-}"
145+
label="$os|Electron $electron"
146+
outdir="ctrf/${label}"
135147
mkdir -p "$outdir"
136148
out="${outdir}/ctrf-report.json"
137149
138150
dotnet tool run DotnetCtrfJsonReporter -p "$trx" -d "$outdir" -f "ctrf-report.json"
139151
140-
jq --arg os "$os" '.results.tests |= map(.filePath = $os)' "$out" > "${out}.tmp" && mv "${out}.tmp" "$out"
152+
jq --arg fp "$label" '.results.tests |= map(.filePath = $fp)' "$out" > "${out}.tmp" && mv "${out}.tmp" "$out"
141153
142154
echo "Converted & normalized $trx -> $out"
143155
conv=$((conv+1))
@@ -149,7 +161,6 @@ jobs:
149161
uses: ctrf-io/github-test-reporter@v1
150162
with:
151163
report-path: 'ctrf/**/*.json'
152-
153164
summary: true
154165
pull-request: false
155166
status-check: false
@@ -162,7 +173,6 @@ jobs:
162173
group-by: 'suite'
163174
upload-artifact: true
164175
fetch-previous-results: true
165-
166176
summary-report: false
167177
summary-delta-report: true
168178
github-report: true
@@ -180,7 +190,6 @@ jobs:
180190
flaky-rate-report: true
181191
fail-rate-report: false
182192
slowest-report: false
183-
184193
report-order: 'summary-delta-report,failed-report,skipped-report,suite-folded-report,file-report,previous-results-report,github-report'
185194
env:
186195
GITHUB_TOKEN: ${{ github.token }}

0 commit comments

Comments
 (0)