Commit 74914ab
Fix CI failures on master and add workflow_dispatch to all workflows (#1928)
* Fix CI failures on master and add workflow_dispatch to all workflows
This commit addresses two critical CI issues:
1. **Fix generator validation failing in CI**:
- The rake task that generates example apps was calling `rails generate`
as a shell command, which spawned a new process without the
REACT_ON_RAILS_SKIP_VALIDATION environment variable set
- Modified shakapacker_examples.rake to prefix generator commands with
the ENV variable so validation is skipped during npm package installation
- This resolves the "No React on Rails npm package is installed" error
that was breaking the examples workflow on master
2. **Add workflow_dispatch to all CI workflows**:
- Added workflow_dispatch trigger to enable manual workflow runs on any
branch via GitHub Actions UI
- This makes CI testing more flexible and allows developers to test
changes on feature branches without needing to open a PR
- Updated workflows: main.yml, lint-js-and-ruby.yml,
rspec-package-specs.yml, package-js-tests.yml, pro-integration-tests.yml,
pro-package-tests.yml, pro-lint.yml
The generator validation fix complements the existing skip logic added in
PR #1923 which only handled direct generator invocations, not shell command
invocations.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
* Add documentation clarifying ENV variable scope in rake task
Added comprehensive comment explaining why we prefix shell commands with
the ENV variable rather than setting it in the Ruby process:
1. Each shell command spawns a new process with its own environment
2. ENV variable is automatically scoped to each command (no cleanup needed)
3. Simpler and safer than the generator approach which requires explicit
ENV cleanup
This addresses potential confusion about ENV variable scope differences
between the rake task approach and the generator approach in
lib/generators/react_on_rails/install_generator.rb.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
---------
Co-authored-by: Claude <noreply@anthropic.com>1 parent eb16495 commit 74914ab
File tree
7 files changed
+22
-1
lines changed- .github/workflows
- rakelib
7 files changed
+22
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| 18 | + | |
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
41 | 56 | | |
42 | 57 | | |
43 | 58 | | |
| |||
0 commit comments