@@ -2,7 +2,7 @@ name: E2E matrix
22
33on :
44 schedule :
5- - cron : " 0 5 * * *"
5+ - cron : ' 0 5 * * *'
66 workflow_dispatch :
77 inputs :
88 debug_enabled :
1414env :
1515 CYPRESS_CACHE_FOLDER : ${{ github.workspace }}/.cypress
1616
17- permissions : { }
17+ permissions : {}
1818jobs :
1919 preinstall :
2020 if : ${{ github.repository_owner == 'nrwl' }}
3838 # - os: macos-latest
3939 # node_version: 23
4040 # - os: windows-latest TODO (emily): Windows fails to build gradle wrapper which always runs when we build nx. Re-enable when we fix this.
41- # node_version: 22
41+ # node_version: 22
4242 # - os: windows-latest TODO (emily): Windows fails to build gradle wrapper which always runs when we build nx. Re-enable when we fix this.
4343 # node_version: 23
4444
@@ -127,8 +127,7 @@ jobs:
127127
128128 - name : Process matrix data
129129 id : process-json
130- run :
131- echo "MATRIX=$(npx tsx .github/workflows/nightly/process-matrix.ts | jq -c .)" >> $GITHUB_OUTPUT
130+ run : echo "MATRIX=$(npx tsx .github/workflows/nightly/process-matrix.ts | jq -c .)" >> $GITHUB_OUTPUT
132131
133132 e2e :
134133 if : ${{ github.repository_owner == 'nrwl' }}
@@ -138,7 +137,7 @@ jobs:
138137 permissions :
139138 contents : read
140139 runs-on : ${{ matrix.os }}
141- timeout-minutes : 200 # <- cap each job to 200 minutes
140+ timeout-minutes : 200 # <- cap each job to 200 minutes
142141 strategy :
143142 matrix : ${{fromJson(needs.prepare-matrix.outputs.matrix)}} # Load matrix from previous job
144143 fail-fast : false
@@ -176,7 +175,12 @@ jobs:
176175 - name : Load Cargo Env
177176 if : ${{ matrix.os != 'windows-latest' }}
178177 run : echo "PATH=$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV
179-
178+
179+ - name : Setup .NET 9
180+ uses : actions/setup-dotnet@d4c94342e560b34958eacfc5d055d21461ed1c5d # v5.0.0
181+ with :
182+ dotnet-version : ' 9.0.x'
183+
180184 - name : Install bun
181185 if : ${{ matrix.os != 'windows-latest' }}
182186 uses : oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # v2.0.2
@@ -195,7 +199,7 @@ jobs:
195199 # https://github.com/actions/virtual-environments/issues/2840
196200 sudo rm -rf /usr/share/dotnet
197201 sudo rm -rf /opt/ghc
198- sudo rm -rf " /usr/local/share/boost"
202+ sudo rm -rf ' /usr/local/share/boost'
199203 sudo rm -rf "$AGENT_TOOLSDIRECTORY"
200204 sudo apt-get install lsof
201205 echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
@@ -231,99 +235,99 @@ jobs:
231235 # Ensure Xcode command line tools are installed and configured
232236 xcode-select --print-path || sudo xcode-select --reset
233237 sudo xcode-select -s /Applications/Xcode.app
234-
238+
235239 # Install or update applesimutils with error handling
236240 if ! brew list applesimutils &>/dev/null; then
237- echo " Installing applesimutils..."
241+ echo ' Installing applesimutils...'
238242 HOMEBREW_NO_AUTO_UPDATE=1 brew tap wix/brew >/dev/null
239243 HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils >/dev/null || {
240- echo " Failed to install applesimutils, retrying with update..."
244+ echo ' Failed to install applesimutils, retrying with update...'
241245 brew update
242246 HOMEBREW_NO_AUTO_UPDATE=1 brew install applesimutils
243247 }
244248 else
245- echo " Updating applesimutils..."
249+ echo ' Updating applesimutils...'
246250 HOMEBREW_NO_AUTO_UPDATE=1 brew upgrade applesimutils || true
247251 fi
248-
252+
249253 # Verify applesimutils installation
250- applesimutils --version || (echo " applesimutils installation failed" && exit 1)
251-
254+ applesimutils --version || (echo ' applesimutils installation failed' && exit 1)
255+
252256 # Configure environment for M-series Mac
253- echo " DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer" >> $GITHUB_ENV
254- echo " PLATFORM_NAME=iOS Simulator" >> $GITHUB_ENV
255-
257+ echo ' DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer' >> $GITHUB_ENV
258+ echo ' PLATFORM_NAME=iOS Simulator' >> $GITHUB_ENV
259+
256260 # Set additional environment variables for better debugging
257- echo " DETOX_DISABLE_TELEMETRY=1" >> $GITHUB_ENV
258- echo " DETOX_LOG_LEVEL=trace" >> $GITHUB_ENV
259-
261+ echo ' DETOX_DISABLE_TELEMETRY=1' >> $GITHUB_ENV
262+ echo ' DETOX_LOG_LEVEL=trace' >> $GITHUB_ENV
263+
260264 # Verify Xcode installation
261265 xcodebuild -version
262-
266+
263267 timeout-minutes : 10
264268 continue-on-error : false
265269
266270 - name : Reset iOS Simulators
267271 if : ${{ matrix.os == 'macos-latest' }}
268272 id : reset-simulators
269273 run : |
270- echo " Resetting iOS Simulators..."
271-
274+ echo ' Resetting iOS Simulators...'
275+
272276 # Kill simulator processes
273277 sudo killall -9 com.apple.CoreSimulator.CoreSimulatorService 2>/dev/null || true
274- killall " Simulator" 2>/dev/null || true
275- killall " iOS Simulator" 2>/dev/null || true
276-
278+ killall ' Simulator' 2>/dev/null || true
279+ killall ' iOS Simulator' 2>/dev/null || true
280+
277281 # Wait for processes to terminate
278282 sleep 3
279-
283+
280284 # Shutdown and erase all simulators (ignore failures)
281285 xcrun simctl shutdown all 2>/dev/null || true
282286 sleep 5
283287 xcrun simctl erase all 2>/dev/null || true
284-
288+
285289 # If erase failed, try the nuclear option
286- if xcrun simctl list devices | grep -q " Booted" 2>/dev/null; then
287- echo " Standard reset failed, using nuclear option..."
290+ if xcrun simctl list devices | grep -q ' Booted' 2>/dev/null; then
291+ echo ' Standard reset failed, using nuclear option...'
288292 rm -rf ~/Library/Developer/CoreSimulator/Devices/* 2>/dev/null || true
289293 launchctl remove com.apple.CoreSimulator.CoreSimulatorService 2>/dev/null || true
290294 sleep 3
291295 fi
292-
296+
293297 # Clean up additional directories
294298 rm -rf ~/Library/Developer/CoreSimulator/Caches/* 2>/dev/null || true
295299 rm -rf ~/Library/Logs/CoreSimulator/* 2>/dev/null || true
296300 rm -rf ~/Library/Developer/Xcode/DerivedData/* 2>/dev/null || true
297-
298- echo " Simulator reset completed"
301+
302+ echo ' Simulator reset completed'
299303 timeout-minutes : 5
300304 continue-on-error : true
301305
302306 - name : Verify Simulator Reset
303307 if : ${{ matrix.os == 'macos-latest' && steps.reset-simulators.outcome == 'success' }}
304308 run : |
305309 # Verify CoreSimulator service restarted
306- pgrep -fl " CoreSimulator" || (echo " CoreSimulator service not running" && exit 1)
307-
310+ pgrep -fl ' CoreSimulator' || (echo ' CoreSimulator service not running' && exit 1)
311+
308312 # Verify simulator runtime paths exist and are writable
309- test -d ~/Library/Developer/CoreSimulator/Devices || (echo " Simulator devices directory missing" && exit 1)
310- touch ~/Library/Developer/CoreSimulator/Devices/test || (echo " Simulator devices directory not writable" && exit 1)
313+ test -d ~/Library/Developer/CoreSimulator/Devices || (echo ' Simulator devices directory missing' && exit 1)
314+ touch ~/Library/Developer/CoreSimulator/Devices/test || (echo ' Simulator devices directory not writable' && exit 1)
311315 rm ~/Library/Developer/CoreSimulator/Devices/test
312316 timeout-minutes : 5
313317
314318 - name : Diagnose Simulator Reset Failure
315319 if : ${{ matrix.os == 'macos-latest' && steps.reset-simulators.outcome == 'failure' }}
316320 run : |
317- echo " Simulator reset failed. Collecting diagnostic information..."
321+ echo ' Simulator reset failed. Collecting diagnostic information...'
318322 xcrun simctl list
319- echo " Checking simulator logs..."
320- ls -la ~/Library/Logs/CoreSimulator/ || echo " No simulator logs found"
323+ echo ' Checking simulator logs...'
324+ ls -la ~/Library/Logs/CoreSimulator/ || echo ' No simulator logs found'
321325
322326 - name : Configure git metadata (needed for lerna smoke tests)
323327 if : ${{ (matrix.os != 'macos-latest') || (matrix.os == 'macos-latest' && steps.reset-simulators.outcome == 'success') }}
324328 run : |
325329 git config --global user.email [email protected] 326- git config --global user.name " Test Test"
330+ git config --global user.name ' Test Test'
327331
328332 - name : Set starting timestamp
329333 if : ${{ (matrix.os != 'macos-latest') || (matrix.os == 'macos-latest' && steps.reset-simulators.outcome == 'success') }}
@@ -352,18 +356,18 @@ jobs:
352356 npm_config_registry : http://localhost:4872
353357 YARN_REGISTRY : http://localhost:4872
354358 CI : true
355-
359+
356360 - name : Run e2e tests with npm (macOS)
357361 id : e2e-run-npm
358362 if : ${{ matrix.os == 'macos-latest' && steps.reset-simulators.outcome == 'success' }}
359363 run : |
360364 # Run the tests
361- if [[ " ${{ matrix.project }}" == " e2e-detox" ]] || [[ " ${{ matrix.project }}" == " e2e-react-native" ]] || [[ " ${{ matrix.project }}" == " e2e-expo" ]]; then
365+ if [[ ' ${{ matrix.project }}' == ' e2e-detox' ]] || [[ ' ${{ matrix.project }}' == ' e2e-react-native' ]] || [[ ' ${{ matrix.project }}' == ' e2e-expo' ]]; then
362366 NX_E2E_VERBOSE_DEBUG=1 pnpm nx run ${{ matrix.project }}:e2e-macos-local
363367 else
364368 NX_E2E_VERBOSE_DEBUG=1 pnpm nx run ${{ matrix.project }}:e2e-local
365369 fi
366-
370+
367371 env :
368372 NX_E2E_CI_CACHE_KEY : e2e-gha-${{ matrix.os }}-${{ matrix.node_version }}-${{ matrix.package_manager }}
369373 NX_PERF_LOGGING : ' false'
@@ -387,10 +391,10 @@ jobs:
387391 before=${{ steps.before-e2e.outputs.timestamp }}
388392 now=$(date +%s)
389393 delta=$(($now - $before))
390-
394+
391395 # Determine the outcome based on which step ran
392- outcome=" ${{ matrix.os == 'macos-latest' && steps.e2e-run-npm.outcome || steps.e2e-run-pnpm.outcome }}"
393-
396+ outcome=' ${{ matrix.os == 'macos-latest' && steps.e2e-run-npm.outcome || steps.e2e-run-pnpm.outcome }}'
397+
394398 matrix=$((
395399 echo '${{ toJSON(matrix) }}'
396400 ) | jq --argjson delta $delta -c '. + { "status": "'"$outcome"'", "duration": $delta }')
0 commit comments