-
-
Notifications
You must be signed in to change notification settings - Fork 638
Description
Problem
In PR #2135, changes were made to generator files (lib/generators/react_on_rails/generator_helper.rb, lib/generators/react_on_rails/js_dependency_manager.rb) but CI did not run the full generator test suite.
The generator tests in spec/react_on_rails/generators/install_generator_spec.rb verify that the generator correctly installs dependencies (including the new SWC dependency installation), but these tests may not have been triggered by CI.
Expected Behavior
When any of these paths are modified:
lib/generators/react_on_rails/**/*spec/react_on_rails/generators/**/*
CI should ensure the generator tests run, specifically:
spec/react_on_rails/generators/install_generator_spec.rbspec/react_on_rails/generators/generator_helper_spec.rbspec/react_on_rails/generators/js_dependency_manager_spec.rb
Proposed Solution
Update the CI workflow (likely .github/workflows/main.yml or similar) to:
- Add path detection for generator files
- Ensure
rspec-package-testsjob runs generator specs when generator files change - Consider adding a dedicated generator test job if the current setup doesn't cover this
Files to Review
.github/workflows/main.yml- Check path filters and job triggersrakelib/- Check how generator tests are included in test tasks
Context
This was discovered during PR #2135 which added SWC compiler detection. The changes included a new test verifying SWC dependencies are installed, but it's unclear if CI ran this specific test.
Acceptance Criteria
- Modifying
lib/generators/react_on_rails/*.rbtriggers generator tests - Modifying
spec/react_on_rails/generators/*.rbtriggers generator tests - Generator tests are clearly visible in CI output