77 pull_request :
88
99jobs :
10- examples :
10+ examples :
1111 env :
1212 SKIP_YARN_COREPACK_CHECK : 0
1313 strategy :
@@ -16,83 +16,83 @@ jobs:
1616 versions : ['oldest', 'newest']
1717 runs-on : ubuntu-22.04
1818 steps :
19- - uses : actions/checkout@v4
20- with :
21- persist-credentials : false
22- - name : Get changed files
23- id : changed-files
24- uses : tj-actions/changed-files@v44
25- with :
26- files : |
27- lib/generators/**
28- rakelib/example_type.rb
29- rakelib/example_config.yml
30- rakelib/examples.rake
31- rakelib/run_rspec.rake
32- - name : Setup Ruby
33- uses : ruby/setup-ruby@v1
34- with :
35- ruby-version : ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }}
36- bundler : 2.5.9
37- - name : Setup Node
38- uses : actions/setup-node@v4
39- with :
40- node-version : 20
41- - name : Print system information
42- run : |
43- echo "Linux release: "; cat /etc/issue
44- echo "Current user: "; whoami
45- echo "Current directory: "; pwd
46- echo "Ruby version: "; ruby -v
47- echo "Node version: "; node -v
48- echo "Yarn version: "; yarn --version
49- echo "Bundler version: "; bundle --version
50- - name : run conversion script to support shakapacker v6
51- if : matrix.versions == 'oldest'
52- run : script/convert
53- - name : Save root node_modules to cache
54- uses : actions/cache@v4
55- with :
56- path : node_modules
57- key : v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
58- - name : Save root ruby gems to cache
59- uses : actions/cache@v4
60- with :
61- path : vendor/bundle
62- key : package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
63- - id : get-sha
64- run : echo "sha=\"$(git rev-parse HEAD)\"" >> "$GITHUB_OUTPUT"
65- - name : Install Node modules with Yarn for renderer package
66- run : |
67- yarn install --no-progress --no-emoji
68- sudo yarn global add yalc
69- - name : yalc publish for react-on-rails
70- run : yalc publish
71- - name : Install Ruby Gems for package
72- run : |
73- bundle lock --add-platform 'x86_64-linux'
74- if ! bundle check --path=vendor/bundle; then
75- bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
76- fi
77- - name : Ensure minimum required Chrome version
78- run : |
79- echo -e "Already installed $(google-chrome --version)\n"
80- MINIMUM_REQUIRED_CHROME_VERSION=75
81- INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
82- if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
83- wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
84- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
85- sudo apt-get update
86- sudo apt-get install google-chrome-stable
87- echo -e "\nInstalled $(google-chrome --version)"
88- fi
89- - name : Increase the amount of inotify watchers
90- run : echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
91- - name : Main CI
92- if : steps.changed-files.outputs.any_changed == 'true'
93- run : bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples
94- - name : Store test results
95- uses : actions/upload-artifact@v4
96- with :
97- name : main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
98- path : ~/rspec
19+ - uses : actions/checkout@v4
20+ with :
21+ persist-credentials : false
22+ - name : Get changed files
23+ id : changed-files
24+ uses : tj-actions/changed-files@v44
25+ with :
26+ files : |
27+ lib/generators/**
28+ rakelib/example_type.rb
29+ rakelib/example_config.yml
30+ rakelib/examples.rake
31+ rakelib/run_rspec.rake
32+ - name : Setup Ruby
33+ uses : ruby/setup-ruby@v1
34+ with :
35+ ruby-version : ${{ matrix.versions == 'oldest' && '3.0' || '3.3' }}
36+ bundler : 2.5.9
37+ - name : Setup Node
38+ uses : actions/setup-node@v4
39+ with :
40+ node-version : 20
41+ - name : Print system information
42+ run : |
43+ echo "Linux release: "; cat /etc/issue
44+ echo "Current user: "; whoami
45+ echo "Current directory: "; pwd
46+ echo "Ruby version: "; ruby -v
47+ echo "Node version: "; node -v
48+ echo "Yarn version: "; yarn --version
49+ echo "Bundler version: "; bundle --version
50+ - name : run conversion script to support shakapacker v6
51+ if : matrix.versions == 'oldest'
52+ run : script/convert
53+ - name : Save root node_modules to cache
54+ uses : actions/cache@v4
55+ with :
56+ path : node_modules
57+ key : v5-package-node-modules-cache-${{ hashFiles('yarn.lock') }}
58+ - name : Save root ruby gems to cache
59+ uses : actions/cache@v4
60+ with :
61+ path : vendor/bundle
62+ key : package-app-gem-cache-${{ hashFiles('react_on_rails.gemspec') }}-${{ hashFiles('Gemfile.development_dependencies') }}-${{ matrix.versions }}
63+ - id : get-sha
64+ run : echo "sha=\"$(git rev-parse HEAD)\"" >> "$GITHUB_OUTPUT"
65+ - name : Install Node modules with Yarn for renderer package
66+ run : |
67+ yarn install --no-progress --no-emoji
68+ sudo yarn global add yalc
69+ - name : yalc publish for react-on-rails
70+ run : yalc publish
71+ - name : Install Ruby Gems for package
72+ run : |
73+ bundle lock --add-platform 'x86_64-linux'
74+ if ! bundle check --path=vendor/bundle; then
75+ bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
76+ fi
77+ - name : Ensure minimum required Chrome version
78+ run : |
79+ echo -e "Already installed $(google-chrome --version)\n"
80+ MINIMUM_REQUIRED_CHROME_VERSION=75
81+ INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
82+ if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
83+ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
84+ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
85+ sudo apt-get update
86+ sudo apt-get install google-chrome-stable
87+ echo -e "\nInstalled $(google-chrome --version)"
88+ fi
89+ - name : Increase the amount of inotify watchers
90+ run : echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
91+ - name : Main CI
92+ if : steps.changed-files.outputs.any_changed == 'true'
93+ run : bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples
94+ - name : Store test results
95+ uses : actions/upload-artifact@v4
96+ with :
97+ name : main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
98+ path : ~/rspec
0 commit comments