@@ -64,6 +64,7 @@ PRO_RUBY_CHANGED=false
6464PRO_RSPEC_CHANGED=false
6565PRO_JS_CHANGED=false
6666PRO_DUMMY_CHANGED=false
67+ PRO_NODE_RENDERER_CHANGED=false
6768UNCATEGORIZED_CHANGED=false
6869
6970# Analyze each changed file
@@ -128,6 +129,12 @@ while IFS= read -r file; do
128129 PRO_DUMMY_CHANGED=true
129130 ;;
130131
132+ # React on Rails Pro Node Renderer package (JS/TS source, tests, configs)
133+ packages/react-on-rails-pro-node-renderer/src/* |packages/react-on-rails-pro-node-renderer/src/** /* |packages/react-on-rails-pro-node-renderer/tests/* |packages/react-on-rails-pro-node-renderer/tests/** /* |packages/react-on-rails-pro-node-renderer/scripts/* |packages/react-on-rails-pro-node-renderer/scripts/** /* |packages/react-on-rails-pro-node-renderer/package.json|packages/react-on-rails-pro-node-renderer/tsconfig.json|.github/workflows/node-renderer-tests.yml)
134+ DOCS_ONLY=false
135+ PRO_NODE_RENDERER_CHANGED=true
136+ ;;
137+
131138 # Lint/format configuration
132139 .rubocop.yml|.eslintrc* |.prettierrc* |tsconfig.json|.editorconfig|.github/workflows/lint-js-and-ruby.yml)
133140 DOCS_ONLY=false
@@ -215,7 +222,6 @@ if [ "$DOCS_ONLY" = true ]; then
215222 exit 0
216223fi
217224
218- # TODO: need to add node-renderer tests
219225echo " Changed file categories:"
220226[ " $RUBY_CHANGED " = true ] && echo -e " ${YELLOW} • Ruby source code${NC} "
221227[ " $JS_CHANGED " = true ] && echo -e " ${YELLOW} • JavaScript/TypeScript code${NC} "
@@ -226,6 +232,7 @@ echo "Changed file categories:"
226232[ " $PRO_RSPEC_CHANGED " = true ] && echo -e " ${YELLOW} • React on Rails Pro RSpec tests${NC} "
227233[ " $PRO_RUBY_CHANGED " = true ] && echo -e " ${YELLOW} • React on Rails Pro Ruby source code${NC} "
228234[ " $PRO_DUMMY_CHANGED " = true ] && echo -e " ${YELLOW} • React on Rails Pro Dummy app${NC} "
235+ [ " $PRO_NODE_RENDERER_CHANGED " = true ] && echo -e " ${YELLOW} • React on Rails Pro Node Renderer package${NC} "
229236[ " $LINT_CONFIG_CHANGED " = true ] && echo -e " ${YELLOW} • Lint/format configuration${NC} "
230237[ " $PRO_LINT_CONFIG_CHANGED " = true ] && echo -e " ${YELLOW} • React on Rails Pro lint/format configuration${NC} "
231238[ " $UNCATEGORIZED_CHANGED " = true ] && echo -e " ${YELLOW} • Uncategorized changes (running full suite for safety)${NC} "
@@ -242,6 +249,7 @@ RUN_GENERATORS=false
242249RUN_PRO_LINT=false
243250RUN_PRO_TESTS=false
244251RUN_PRO_DUMMY_TESTS=false
252+ RUN_PRO_NODE_RENDERER_TESTS=false
245253
246254if [ " $LINT_CONFIG_CHANGED " = true ] || [ " $RUBY_CHANGED " = true ] || [ " $JS_CHANGED " = true ] || [ " $SPEC_DUMMY_CHANGED " = true ]; then
247255 RUN_LINT=true
@@ -275,6 +283,10 @@ if [ "$PRO_DUMMY_CHANGED" = true ] || [ "$PRO_RUBY_CHANGED" = true ] || [ "$PRO_
275283 RUN_PRO_DUMMY_TESTS=true
276284fi
277285
286+ if [ " $PRO_NODE_RENDERER_CHANGED " = true ] || [ " $PRO_JS_CHANGED " = true ] || [ " $RUBY_CHANGED " = true ]; then
287+ RUN_PRO_NODE_RENDERER_TESTS=true
288+ fi
289+
278290# If we encounter a change that isn't explicitly categorized, default to running everything
279291if [ " $UNCATEGORIZED_CHANGED " = true ]; then
280292 RUN_LINT=true
@@ -285,6 +297,7 @@ if [ "$UNCATEGORIZED_CHANGED" = true ]; then
285297 RUN_PRO_LINT=true
286298 RUN_PRO_TESTS=true
287299 RUN_PRO_DUMMY_TESTS=true
300+ RUN_PRO_NODE_RENDERER_TESTS=true
288301fi
289302
290303[ " $RUN_LINT " = true ] && echo " ✓ Lint (Ruby + JS)"
295308[ " $RUN_PRO_LINT " = true ] && echo " ✓ React on Rails Pro Lint (Ruby + JS)"
296309[ " $RUN_PRO_TESTS " = true ] && echo " ✓ React on Rails Pro RSpec unit tests (Ruby + JS)"
297310[ " $RUN_PRO_DUMMY_TESTS " = true ] && echo " ✓ React on Rails Pro Dummy app integration tests"
311+ [ " $RUN_PRO_NODE_RENDERER_TESTS " = true ] && echo " ✓ React on Rails Pro Node Renderer tests"
298312
299313# Export as GitHub Actions outputs if running in CI
300314if [ -n " ${GITHUB_OUTPUT:- } " ]; then
@@ -308,6 +322,7 @@ if [ -n "${GITHUB_OUTPUT:-}" ]; then
308322 echo " run_pro_lint=$RUN_PRO_LINT "
309323 echo " run_pro_tests=$RUN_PRO_TESTS "
310324 echo " run_pro_dummy_tests=$RUN_PRO_DUMMY_TESTS "
325+ echo " run_pro_node_renderer_tests=$RUN_PRO_NODE_RENDERER_TESTS "
311326 } >> " $GITHUB_OUTPUT "
312327fi
313328
@@ -323,7 +338,8 @@ if [ "${CI_JSON_OUTPUT:-}" = "1" ]; then
323338 "run_generators": $RUN_GENERATORS ,
324339 "run_pro_lint": $RUN_PRO_LINT ,
325340 "run_pro_tests": $RUN_PRO_TESTS ,
326- "run_pro_dummy_tests": $RUN_PRO_DUMMY_TESTS
341+ "run_pro_dummy_tests": $RUN_PRO_DUMMY_TESTS ,
342+ "run_pro_node_renderer_tests": $RUN_PRO_NODE_RENDERER_TESTS
327343}
328344EOF
329345fi
0 commit comments