@@ -87,35 +87,20 @@ jobs:
8787 # Split Electron and Tauri tests across separate jobs for better parallelization and clarity
8888 # Electron apps are built inline on the test runner (faster builds, Turbo caching handles it)
8989 # Tauri apps are built separately due to longer build times and system dependencies
90- package-electron-linux :
91- name : Package - Electron [Linux]
92- needs : [build, lint]
93- uses : ./.github/workflows/_ci-package.reusable.yml
94- with :
95- os : ' ubuntu-latest'
96- service : ' electron'
97- build_id : ${{ needs.build.outputs.build_id }}
98- artifact_size : ${{ needs.build.outputs.artifact_size }}
99- cache_key : ${{ needs.build.outputs.cache_key }}
100-
101- package-electron-windows :
102- name : Package - Electron [Windows]
103- needs : [build, lint]
104- uses : ./.github/workflows/_ci-package.reusable.yml
105- with :
106- os : ' windows-latest'
107- service : ' electron'
108- build_id : ${{ needs.build.outputs.build_id }}
109- artifact_size : ${{ needs.build.outputs.artifact_size }}
110- cache_key : ${{ needs.build.outputs.cache_key }}
111-
112- package-electron-macos :
113- name : Package - Electron [macOS]
90+ # Electron package tests are split by module type (CJS/ESM) for better error isolation
91+ package-electron-matrix :
92+ name : Package - Electron [${{ matrix.os == 'ubuntu-latest' && 'Linux' || matrix.os == 'windows-latest' && 'Windows' || 'macOS' }}] - ${{ matrix.module-type }}
11493 needs : [build, lint]
94+ strategy :
95+ fail-fast : false
96+ matrix :
97+ os : ['ubuntu-latest', 'windows-latest', 'macos-latest']
98+ module-type : ['cjs', 'esm']
11599 uses : ./.github/workflows/_ci-package.reusable.yml
116100 with :
117- os : ' macos-latest '
101+ os : ${{ matrix.os }}
118102 service : ' electron'
103+ module-type : ${{ matrix.module-type }}
119104 build_id : ${{ needs.build.outputs.build_id }}
120105 artifact_size : ${{ needs.build.outputs.artifact_size }}
121106 cache_key : ${{ needs.build.outputs.cache_key }}
@@ -159,10 +144,10 @@ jobs:
159144 # E2E test matrix strategy:
160145 # - Run tests across 3 operating systems (Linux, Windows, macOS)
161146 # - Test 3 scenarios (builder, forge, no-binary)
162- # - Test 2 module types ( ESM, CJS )
147+ # - E2E tests use ESM only (CJS/ ESM testing is done in package tests )
163148 # - Optimize for GitHub Actions concurrency limits
164149 e2e-matrix :
165- name : E2E - Electron [${{ matrix.os == 'ubuntu-latest' && 'Linux' || matrix.os == 'windows-latest' && 'Windows' || 'macOS' }}] - ${{ matrix.scenario }}${{ matrix.type != '*' && format(' ({0})', matrix.type) || '' }}
150+ name : E2E - Electron [${{ matrix.os == 'ubuntu-latest' && 'Linux' || matrix.os == 'windows-latest' && 'Windows' || 'macOS' }}] - ${{ matrix.scenario }}
166151 needs : [build]
167152 strategy :
168153 fail-fast : false
@@ -171,23 +156,11 @@ jobs:
171156 os : ['ubuntu-latest', 'windows-latest', 'macos-latest']
172157 # Test all application scenarios
173158 scenario : ['builder', 'forge', 'no-binary']
174- # Test both module types and wildcard for combined tests
175- type : ['esm', 'cjs', '*']
176- exclude :
177- # Optimization: All platforms run ESM and CJS separately for consistent resource management
178- # This prevents individual jobs from running too many test variants simultaneously
179- - os : ' ubuntu-latest'
180- type : ' *'
181- - os : ' windows-latest'
182- type : ' *'
183- - os : ' macos-latest'
184- type : ' *'
185159 uses : ./.github/workflows/_ci-e2e.reusable.yml
186160 with :
187161 os : ${{ matrix.os }}
188162 node-version : ' 20'
189163 scenario : ${{ matrix.scenario }}
190- type : ${{ matrix.type }}
191164 build_id : ${{ needs.build.outputs.build_id }}
192165 artifact_size : ${{ needs.build.outputs.artifact_size }}
193166 cache_key : ${{ needs.build.outputs.cache_key }}
@@ -258,28 +231,19 @@ jobs:
258231 # Mac Universal builds require special handling
259232 # These are separate from regular macOS tests because they use a different build command
260233 e2e-mac-universal-matrix :
261- name : E2E [macOS-U] - ${{ matrix.scenario }}${{ matrix.type != '*' && format(' ({0})', matrix.type) || '' }}
234+ name : E2E [macOS-U] - ${{ matrix.scenario }}
262235 needs : [build]
263236 strategy :
264237 fail-fast : false
265238 matrix :
266239 # Test both application scenarios
267240 scenario : ['forge', 'builder']
268- # Test both module types and wildcard for combined tests
269- type : ['esm', 'cjs', '*']
270- exclude :
271- # Optimization: Both forge and builder tests run ESM and CJS separately for better error isolation
272- - scenario : ' forge'
273- type : ' *'
274- - scenario : ' builder'
275- type : ' *'
276241 uses : ./.github/workflows/_ci-e2e.reusable.yml
277242 with :
278243 os : ' macos-latest'
279244 node-version : ' 20'
280245 build-command : ' build:mac-universal'
281246 scenario : ${{ matrix.scenario }}
282- type : ${{ matrix.type }}
283247 build_id : ${{ needs.build.outputs.build_id }}
284248 artifact_size : ${{ needs.build.outputs.artifact_size }}
285249 cache_key : ${{ needs.build.outputs.cache_key }}
0 commit comments