Skip to content

Commit 4078568

Browse files
committed
Address comments
1 parent 29c4946 commit 4078568

4 files changed

Lines changed: 69 additions & 26 deletions

File tree

.github/workflows/linux-arm64-build-and-test.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,18 @@ jobs:
9595
# Fix ownership of the workspace to allow write access
9696
sudo chown -R $(whoami):$(whoami) $GITHUB_WORKSPACE
9797
98+
# Wrap the test step in nick-fields/retry@v4 to absorb transient flakes
99+
# (mocha races, native rebuilds, Electron postinstall, network blips).
100+
# Keep max_attempts low so real regressions still surface quickly.
98101
- name: Build and test rclnodejs
99-
run: |
100-
uname -a
101-
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
102-
npm i
103-
npm test
102+
uses: nick-fields/retry@v4
103+
with:
104+
shell: bash
105+
max_attempts: 2
106+
retry_wait_seconds: 10
107+
timeout_minutes: 60
108+
command: |
109+
uname -a
110+
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
111+
npm i
112+
npm test

.github/workflows/linux-x64-asan-test.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,16 @@ jobs:
4141
source /opt/ros/jazzy/setup.bash
4242
npm i
4343
44+
# Wrap the asan test step in nick-fields/retry@v4 to absorb transient
45+
# flakes. ASan can be sensitive to timing-related test races; keep
46+
# max_attempts low so real regressions still surface quickly.
4447
- name: Build and test with AddressSanitizer
45-
run: |
46-
source /opt/ros/jazzy/setup.bash
47-
npm run test:asan
48+
uses: nick-fields/retry@v4
49+
with:
50+
shell: bash
51+
max_attempts: 2
52+
retry_wait_seconds: 10
53+
timeout_minutes: 60
54+
command: |
55+
source /opt/ros/jazzy/setup.bash
56+
npm run test:asan

.github/workflows/linux-x64-build-and-test.yml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -123,22 +123,39 @@ jobs:
123123
124124
- uses: actions/checkout@v6
125125

126+
# The mocha suite and the Electron postinstall (extract-zip 2.0.1) are
127+
# known to be intermittently flaky on this runner. Wrap both test
128+
# invocations in nick-fields/retry@v4 so a single transient failure does
129+
# not fail the whole matrix leg. Keep max_attempts conservative so real
130+
# regressions still surface quickly.
126131
- name: Build and test rclnodejs
127-
run: |
128-
uname -a
129-
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
130-
npm i
131-
npm run lint
132-
npm test
133-
npm run clean
132+
uses: nick-fields/retry@v4
133+
with:
134+
shell: bash
135+
max_attempts: 2
136+
retry_wait_seconds: 10
137+
timeout_minutes: 60
138+
command: |
139+
uname -a
140+
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
141+
npm i
142+
npm run lint
143+
npm test
144+
npm run clean
134145
135146
- name: Test with IDL ROS messages (rolling / lyrical)
136147
if: ${{ matrix.ros_distribution == 'rolling' || matrix.ros_distribution == 'lyrical' }}
137-
run: |
138-
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
139-
npm i
140-
npm run test-idl
141-
npm run clean
148+
uses: nick-fields/retry@v4
149+
with:
150+
shell: bash
151+
max_attempts: 2
152+
retry_wait_seconds: 10
153+
timeout_minutes: 60
154+
command: |
155+
source /opt/ros/${{ matrix.ros_distribution }}/setup.bash
156+
npm i
157+
npm run test-idl
158+
npm run clean
142159
143160
- name: Coveralls
144161
if: ${{ matrix.ros_distribution == 'rolling' && matrix['node-version'] == '24.X' }}

.github/workflows/windows-build-and-test.yml

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,19 @@ jobs:
8888
call "C:\pixi_ws\ros2-windows\setup.bat"
8989
npm i
9090
91+
# Wrap the test step in nick-fields/retry@v4 to absorb transient flakes
92+
# (mocha races, native rebuilds, network blips). Keep max_attempts low so
93+
# real regressions still surface quickly.
9194
- name: Test rclnodejs
9295
if: ${{ matrix.run_tests }}
93-
shell: cmd
94-
run: |
95-
set PATH=C:\pixi_ws\.pixi\envs\default\Library\bin;C:\pixi_ws\.pixi\envs\default\Scripts;C:\pixi_ws\.pixi\envs\default\bin;%PATH%
96-
set RMW_IMPLEMENTATION=rmw_fastrtps_cpp
97-
call "C:\pixi_ws\ros2-windows\setup.bat"
98-
npm test
96+
uses: nick-fields/retry@v4
97+
with:
98+
shell: cmd
99+
max_attempts: 2
100+
retry_wait_seconds: 10
101+
timeout_minutes: 60
102+
command: |
103+
set PATH=C:\pixi_ws\.pixi\envs\default\Library\bin;C:\pixi_ws\.pixi\envs\default\Scripts;C:\pixi_ws\.pixi\envs\default\bin;%PATH%
104+
set RMW_IMPLEMENTATION=rmw_fastrtps_cpp
105+
call "C:\pixi_ws\ros2-windows\setup.bat"
106+
npm test

0 commit comments

Comments
 (0)