1010 build-dummy-app-webpack-test-bundles :
1111 strategy :
1212 matrix :
13- versions : ['oldest', 'newest']
13+ ruby-version : ['3.2', '3.4']
14+ node-version : ['20', '22']
15+ include :
16+ - ruby-version : ' 3.2'
17+ node-version : ' 20'
18+ dependency-level : ' minimum'
19+ - ruby-version : ' 3.4'
20+ node-version : ' 22'
21+ dependency-level : ' latest'
22+ exclude :
23+ - ruby-version : ' 3.2'
24+ node-version : ' 22'
25+ - ruby-version : ' 3.4'
26+ node-version : ' 20'
1427 runs-on : ubuntu-22.04
1528 steps :
1629 - uses : actions/checkout@v4
1932 - name : Setup Ruby
2033 uses : ruby/setup-ruby@v1
2134 with :
22- ruby-version : ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }}
35+ ruby-version : ${{ matrix.ruby-version }}
2336 bundler : 2.5.9
2437 # libyaml-dev is needed for psych v5
2538 # this gem depends on sdoc which depends on rdoc which depends on psych
2841 - name : Setup Node
2942 uses : actions/setup-node@v4
3043 with :
31- node-version : ${{ matrix.versions == 'oldest' && '16' || '20' }}
44+ node-version : ${{ matrix.node-version }}
3245 cache : yarn
3346 cache-dependency-path : ' **/yarn.lock'
3447 - name : Print system information
@@ -41,23 +54,23 @@ jobs:
4154 echo "Yarn version: "; yarn --version
4255 echo "Bundler version: "; bundle --version
4356 - name : run conversion script to support shakapacker v6
44- if : matrix.versions == 'oldest '
57+ if : matrix.dependency-level == 'minimum '
4558 run : script/convert
4659 - name : Install Node modules with Yarn for renderer package
4760 run : |
48- yarn install --no-progress --no-emoji ${{ matrix.versions == 'newest ' && '--frozen-lockfile' || '' }}
61+ yarn install --no-progress --no-emoji ${{ matrix.dependency-level == 'latest ' && '--frozen-lockfile' || '' }}
4962 sudo yarn global add yalc
5063 - name : yalc publish for react-on-rails
5164 run : yalc publish
5265 - name : yalc add react-on-rails
5366 run : cd spec/dummy && yalc add react-on-rails
5467 - name : Install Node modules with Yarn for dummy app
55- run : cd spec/dummy && yarn install --no-progress --no-emoji ${{ matrix.versions == 'newest ' && '--frozen-lockfile' || '' }}
68+ run : cd spec/dummy && yarn install --no-progress --no-emoji ${{ matrix.dependency-level == 'latest ' && '--frozen-lockfile' || '' }}
5669 - name : Save dummy app ruby gems to cache
5770 uses : actions/cache@v4
5871 with :
5972 path : spec/dummy/vendor/bundle
60- key : dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}-${{ matrix.versions }}
73+ key : dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}-ruby ${{ matrix.ruby-version }}-${{ matrix.dependency-level }}
6174 - name : Install Ruby Gems for dummy app
6275 run : |
6376 cd spec/dummy
@@ -68,21 +81,34 @@ jobs:
6881 - name : generate file system-based packs
6982 run : cd spec/dummy && RAILS_ENV="test" bundle exec rake react_on_rails:generate_packs
7083 - name : Build test bundles for dummy app
71- run : cd spec/dummy && rm -rf public/webpack/test && yarn run build:rescript && RAILS_ENV="test" NODE_ENV="test" bin/${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer
84+ run : cd spec/dummy && rm -rf public/webpack/test && yarn run build:rescript && RAILS_ENV="test" NODE_ENV="test" bin/shakapacker
7285 - id : get-sha
7386 run : echo "sha=\"$(git rev-parse HEAD)\"" >> "$GITHUB_OUTPUT"
7487 - name : Save test Webpack bundles to cache (for build number checksum used by RSpec job)
7588 uses : actions/cache/save@v4
7689 with :
7790 path : spec/dummy/public/webpack
78- key : dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}-${{ matrix.versions }}
91+ key : dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}-ruby ${{ matrix.ruby-version }}-${{ matrix.dependency-level }}
7992
8093 dummy-app-integration-tests :
8194 needs : build-dummy-app-webpack-test-bundles
8295 strategy :
8396 fail-fast : false
8497 matrix :
85- versions : ['oldest', 'newest']
98+ ruby-version : ['3.2', '3.4']
99+ node-version : ['20', '22']
100+ include :
101+ - ruby-version : ' 3.2'
102+ node-version : ' 20'
103+ dependency-level : ' minimum'
104+ - ruby-version : ' 3.4'
105+ node-version : ' 22'
106+ dependency-level : ' latest'
107+ exclude :
108+ - ruby-version : ' 3.2'
109+ node-version : ' 22'
110+ - ruby-version : ' 3.4'
111+ node-version : ' 20'
86112 runs-on : ubuntu-22.04
87113 steps :
88114 - uses : actions/checkout@v4
@@ -91,12 +117,12 @@ jobs:
91117 - name : Setup Ruby
92118 uses : ruby/setup-ruby@v1
93119 with :
94- ruby-version : ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }}
120+ ruby-version : ${{ matrix.ruby-version }}
95121 bundler : 2.5.9
96122 - name : Setup Node
97123 uses : actions/setup-node@v4
98124 with :
99- node-version : ${{ matrix.versions == 'oldest' && '16' || '20' }}
125+ node-version : ${{ matrix.node-version }}
100126 cache : yarn
101127 cache-dependency-path : ' **/yarn.lock'
102128 - name : Print system information
@@ -109,35 +135,35 @@ jobs:
109135 echo "Yarn version: "; yarn --version
110136 echo "Bundler version: "; bundle --version
111137 - name : run conversion script to support shakapacker v6
112- if : matrix.versions == 'oldest '
138+ if : matrix.dependency-level == 'minimum '
113139 run : script/convert
114140 - name : Save root ruby gems to cache
115141 uses : actions/cache@v4
116142 with :
117143 path : vendor/bundle
118- key : package-app-gem-cache-${{ hashFiles('Gemfile.lock') }}-${{ matrix.versions }}
144+ key : package-app-gem-cache-${{ hashFiles('Gemfile.lock') }}-ruby ${{ matrix.ruby-version }}-${{ matrix.dependency-level }}
119145 - name : Save dummy app ruby gems to cache
120146 uses : actions/cache@v4
121147 with :
122148 path : spec/dummy/vendor/bundle
123- key : dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}-${{ matrix.versions }}
149+ key : dummy-app-gem-cache-${{ hashFiles('spec/dummy/Gemfile.lock') }}-ruby ${{ matrix.ruby-version }}-${{ matrix.dependency-level }}
124150 - id : get-sha
125151 run : echo "sha=\"$(git rev-parse HEAD)\"" >> "$GITHUB_OUTPUT"
126152 - name : Save test Webpack bundles to cache (for build number checksum used by RSpec job)
127153 uses : actions/cache@v4
128154 with :
129155 path : spec/dummy/public/webpack
130- key : dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}-${{ matrix.versions }}
156+ key : dummy-app-webpack-bundle-${{ steps.get-sha.outputs.sha }}-ruby ${{ matrix.ruby-version }}-${{ matrix.dependency-level }}
131157 - name : Install Node modules with Yarn
132158 run : |
133- yarn install --no-progress --no-emoji ${{ matrix.versions == 'newest ' && '--frozen-lockfile' || '' }}
159+ yarn install --no-progress --no-emoji ${{ matrix.dependency-level == 'latest ' && '--frozen-lockfile' || '' }}
134160 sudo yarn global add yalc
135161 - name : yalc publish for react-on-rails
136162 run : yalc publish
137163 - name : yalc add react-on-rails
138164 run : cd spec/dummy && yalc add react-on-rails
139165 - name : Install Node modules with Yarn for dummy app
140- run : cd spec/dummy && yarn install --no-progress --no-emoji ${{ matrix.versions == 'newest ' && '--frozen-lockfile' || '' }}
166+ run : cd spec/dummy && yarn install --no-progress --no-emoji ${{ matrix.dependency-level == 'latest ' && '--frozen-lockfile' || '' }}
141167 - name : Dummy JS tests
142168 run : |
143169 cd spec/dummy
@@ -172,34 +198,34 @@ jobs:
172198 - name : generate file system-based packs
173199 run : cd spec/dummy && RAILS_ENV="test" bundle exec rake react_on_rails:generate_packs
174200 - name : Git Stuff
175- if : matrix.versions == 'oldest '
201+ if : matrix.dependency-level == 'minimum '
176202 run : |
177203 git config user.email "[email protected] " 178204 git config user.name "Your Name"
179205 git commit -am "stop generators from complaining about uncommitted code"
180206 - run : cd spec/dummy && bundle info shakapacker
181207 - name : Set packer version environment variable
182208 run : |
183- echo "CI_PACKER_VERSION= ${{ matrix.versions }}" >> $GITHUB_ENV
209+ echo "CI_DEPENDENCY_LEVEL=ruby ${{ matrix.ruby-version }}-${{ matrix.dependency-level }}" >> $GITHUB_ENV
184210 - name : Main CI
185211 run : bundle exec rake run_rspec:all_dummy
186212 - name : Store test results
187213 uses : actions/upload-artifact@v4
188214 with :
189- name : main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
215+ name : main-rspec-${{ github.run_id }}-${{ github.job }}-ruby ${{ matrix.ruby-version }}-${{ matrix.dependency-level }}
190216 path : ~/rspec
191217 - name : Store artifacts
192218 uses : actions/upload-artifact@v4
193219 with :
194- name : dummy-app-capybara-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
220+ name : dummy-app-capybara-${{ github.run_id }}-${{ github.job }}-ruby ${{ matrix.ruby-version }}-${{ matrix.dependency-level }}
195221 path : spec/dummy/tmp/capybara
196222 - name : Store artifacts
197223 uses : actions/upload-artifact@v4
198224 with :
199- name : dummy-app-test-log-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
225+ name : dummy-app-test-log-${{ github.run_id }}-${{ github.job }}-ruby ${{ matrix.ruby-version }}-${{ matrix.dependency-level }}
200226 path : spec/dummy/log/test.log
201227 - name : Store artifacts
202228 uses : actions/upload-artifact@v4
203229 with :
204- name : dummy-app-yarn-log-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
230+ name : dummy-app-yarn-log-${{ github.run_id }}-${{ github.job }}-ruby ${{ matrix.ruby-version }}-${{ matrix.dependency-level }}
205231 path : spec/dummy/yarn-error.log
0 commit comments