-
-
Notifications
You must be signed in to change notification settings - Fork 638
Fix failing install generator tests for v16 #1784
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0eedc2c
e16317b
0da52cb
d770bfc
a53a2f9
3d5bd8c
d65450d
6e41aa3
fd76f8a
4b479ef
aae4e71
bc5ea6f
adaf9a1
3d3accb
5cc7d0d
f1b6579
246cb06
19904ac
e90494e
5b026a1
7921db4
be9ade2
e8aa8dd
6620204
54fc803
26ddaa1
ca40694
6916389
f30f461
7be53cf
b92b351
8c0e224
78c1ad2
f1dee5b
4b853cd
3284099
ca2393d
1bd8d67
5d21dd5
6065e42
86651b3
d54f68d
857b89d
a7a6747
bc2c103
a78fdf3
cf29a5b
8a46235
2873a21
b7b47ae
d1844f4
d1ff388
bf8137e
278ec54
6e828d3
d1baa22
5d71758
68da9bb
57dd47a
d41b71f
fb734c8
2e9e008
7e1c889
2a2009a
068ec90
025b7ba
33b7090
deec2fc
f135934
d127d8f
36fa55a
005ac50
be4cc10
d41b99f
84ec576
1b29b3d
a521ca1
e1d397b
c25df16
bd5e4d3
98e96e6
2401cb9
6f5049a
751ad0f
d3949a6
93a437d
912a763
db2ff4d
2742549
b2cad7d
7e28b9e
d3f925c
974bc90
670a2ae
c7001c6
f21b2dc
99b5ba8
202cd2c
f8a3f6d
1cf4915
a9234a3
87b3695
12fc8a4
b011da8
664e5d9
7d637fb
3502028
093e4fe
aa22d8d
3bad387
dd9e6f8
37e3d43
cd2134f
d42430e
d7e946d
ae100a2
39983c7
f319b5e
486e296
a1a9953
d6ca545
d5b153b
afcb7ac
b602d66
8a00131
171ee01
fa86509
8d178ca
d753ced
3489d5f
07cbe04
c9fb999
4add50a
b6c7a3d
f6a3983
b0e2ce2
3c9f64c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -10,7 +10,7 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||
| build: | ||||||||||||||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||||||||||||||||
| versions: ['oldest', 'newest'] | ||||||||||||||||||||||||||||||||||||||||||
| node-version: ['20', '22'] | ||||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-22.04 | ||||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -19,7 +19,7 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||
| - name: Setup Node | ||||||||||||||||||||||||||||||||||||||||||
| uses: actions/setup-node@v4 | ||||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||||
| node-version: ${{ matrix.versions == 'oldest' && '16' || '20' }} | ||||||||||||||||||||||||||||||||||||||||||
| node-version: ${{ matrix.node-version }} | ||||||||||||||||||||||||||||||||||||||||||
| cache: yarn | ||||||||||||||||||||||||||||||||||||||||||
| cache-dependency-path: '**/yarn.lock' | ||||||||||||||||||||||||||||||||||||||||||
| - name: Print system information | ||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -30,11 +30,11 @@ jobs: | |||||||||||||||||||||||||||||||||||||||||
| echo "Node version: "; node -v | ||||||||||||||||||||||||||||||||||||||||||
| echo "Yarn version: "; yarn --version | ||||||||||||||||||||||||||||||||||||||||||
| - name: run conversion script | ||||||||||||||||||||||||||||||||||||||||||
| if: matrix.versions == 'oldest' | ||||||||||||||||||||||||||||||||||||||||||
| if: matrix.node-version == '20' | ||||||||||||||||||||||||||||||||||||||||||
| run: script/convert | ||||||||||||||||||||||||||||||||||||||||||
| - name: Install Node modules with Yarn for renderer package | ||||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||||
| yarn install --no-progress --no-emoji ${{ matrix.versions == 'newest' && '--frozen-lockfile' || '' }} | ||||||||||||||||||||||||||||||||||||||||||
| yarn install --no-progress --no-emoji ${{ matrix.node-version == '22' && '--frozen-lockfile' || '' }} | ||||||||||||||||||||||||||||||||||||||||||
| sudo yarn global add yalc | ||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
35
to
38
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yarn flag may be incompatible on Node 22 without pinning Yarn 1 --frozen-lockfile is Yarn 1; on Node 22, Corepack may activate Yarn 4+, where --immutable is expected. Pin Yarn 1 or switch flags conditionally. Apply this diff to pin Yarn 1 consistently (then you can keep --frozen-lockfile): - name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: yarn
cache-dependency-path: '**/yarn.lock'
+ - name: Ensure Yarn v1 via Corepack
+ run: |
+ corepack enable
+ corepack prepare yarn@1.22.22 --activate
+ shell: bashOptional follow-up (if you prefer modern Yarn instead): use --immutable for Yarn ≥2 and drop pinning. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||||
| - name: Run JS unit tests for Renderer package | ||||||||||||||||||||||||||||||||||||||||||
| run: yarn test | ||||||||||||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -11,9 +11,10 @@ jobs: | |||||||||||||||||||||||||||||||||||||||
| strategy: | ||||||||||||||||||||||||||||||||||||||||
| fail-fast: false | ||||||||||||||||||||||||||||||||||||||||
| matrix: | ||||||||||||||||||||||||||||||||||||||||
| versions: ['oldest', 'newest'] | ||||||||||||||||||||||||||||||||||||||||
| ruby-version: ['3.2', '3.4'] | ||||||||||||||||||||||||||||||||||||||||
| dependency-level: ['minimum', 'latest'] | ||||||||||||||||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||||||||||||||||
| BUNDLE_FROZEN: ${{ matrix.versions == 'oldest' && 'false' || 'true' }} | ||||||||||||||||||||||||||||||||||||||||
| BUNDLE_FROZEN: ${{ matrix.dependency-level == 'minimum' && 'false' || 'true' }} | ||||||||||||||||||||||||||||||||||||||||
| runs-on: ubuntu-22.04 | ||||||||||||||||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||||||||||||||||
| - uses: actions/checkout@v4 | ||||||||||||||||||||||||||||||||||||||||
|
|
@@ -22,7 +23,7 @@ jobs: | |||||||||||||||||||||||||||||||||||||||
| - name: Setup Ruby | ||||||||||||||||||||||||||||||||||||||||
| uses: ruby/setup-ruby@v1 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| ruby-version: ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }} | ||||||||||||||||||||||||||||||||||||||||
| ruby-version: ${{ matrix.ruby-version }} | ||||||||||||||||||||||||||||||||||||||||
| bundler: 2.5.9 | ||||||||||||||||||||||||||||||||||||||||
| - name: Print system information | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
|
|
@@ -33,34 +34,34 @@ jobs: | |||||||||||||||||||||||||||||||||||||||
| echo "Node version: "; node -v | ||||||||||||||||||||||||||||||||||||||||
| echo "Yarn version: "; yarn --version | ||||||||||||||||||||||||||||||||||||||||
| echo "Bundler version: "; bundle --version | ||||||||||||||||||||||||||||||||||||||||
| - name: run conversion script to support shakapacker v6 | ||||||||||||||||||||||||||||||||||||||||
| if: matrix.versions == 'oldest' | ||||||||||||||||||||||||||||||||||||||||
| - name: run conversion script to use minimum supported dependency versions | ||||||||||||||||||||||||||||||||||||||||
| if: matrix.dependency-level == 'minimum' | ||||||||||||||||||||||||||||||||||||||||
| run: script/convert | ||||||||||||||||||||||||||||||||||||||||
| - name: Save root ruby gems to cache | ||||||||||||||||||||||||||||||||||||||||
| uses: actions/cache@v4 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| path: vendor/bundle | ||||||||||||||||||||||||||||||||||||||||
| key: package-app-gem-cache-${{ hashFiles('Gemfile.lock') }}-${{ matrix.versions }} | ||||||||||||||||||||||||||||||||||||||||
| key: package-app-gem-cache-${{ hashFiles('Gemfile.lock') }}-${{ matrix.ruby-version }}-${{ matrix.dependency-level }} | ||||||||||||||||||||||||||||||||||||||||
| - name: Install Ruby Gems for package | ||||||||||||||||||||||||||||||||||||||||
| run: bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3 | ||||||||||||||||||||||||||||||||||||||||
| - name: Git Stuff | ||||||||||||||||||||||||||||||||||||||||
| if: matrix.versions == 'oldest' | ||||||||||||||||||||||||||||||||||||||||
| if: matrix.dependency-level == 'minimum' | ||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| git config user.email "you@example.com" | ||||||||||||||||||||||||||||||||||||||||
| git config user.name "Your Name" | ||||||||||||||||||||||||||||||||||||||||
| git commit -am "stop generators from complaining about uncommitted code" | ||||||||||||||||||||||||||||||||||||||||
| - name: Set packer version environment variable | ||||||||||||||||||||||||||||||||||||||||
| - name: Set dependency level environment variable | ||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
47
to
+53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Make “Git Stuff” resilient when there’s nothing to commit.
Apply: - - name: Git Stuff
+ - name: Git Stuff
if: matrix.dependency-level == 'minimum'
run: |
git config user.email "you@example.com"
git config user.name "Your Name"
- git commit -am "stop generators from complaining about uncommitted code"
+ # Commit only if there are changes
+ if ! git diff --quiet; then
+ git commit -am "stop generators from complaining about uncommitted code"
+ fi📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||||||||||
| run: | | ||||||||||||||||||||||||||||||||||||||||
| echo "CI_PACKER_VERSION=${{ matrix.versions }}" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||
| echo "CI_DEPENDENCY_LEVEL=${{ matrix.dependency-level }}" >> $GITHUB_ENV | ||||||||||||||||||||||||||||||||||||||||
| - name: Run rspec tests | ||||||||||||||||||||||||||||||||||||||||
| run: bundle exec rspec spec/react_on_rails | ||||||||||||||||||||||||||||||||||||||||
| - name: Store test results | ||||||||||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| name: main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }} | ||||||||||||||||||||||||||||||||||||||||
| name: main-rspec-${{ github.run_id }}-${{ github.job }}-ruby${{ matrix.ruby-version }}-${{ matrix.dependency-level }} | ||||||||||||||||||||||||||||||||||||||||
| path: ~/rspec | ||||||||||||||||||||||||||||||||||||||||
| - name: Store artifacts | ||||||||||||||||||||||||||||||||||||||||
| uses: actions/upload-artifact@v4 | ||||||||||||||||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||||||||||||||||
| name: main-test-log-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }} | ||||||||||||||||||||||||||||||||||||||||
| name: main-test-log-${{ github.run_id }}-${{ github.job }}-ruby${{ matrix.ruby-version }}-${{ matrix.dependency-level }} | ||||||||||||||||||||||||||||||||||||||||
| path: log/test.log | ||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prevent empty-commit failure.
git commit -amexits non‑zero when no changes; guard it.📝 Committable suggestion
🤖 Prompt for AI Agents