77 pull_request :
88
99jobs :
10- examples :
10+ examples :
1111 env :
1212 SKIP_YARN_COREPACK_CHECK : 0
1313 strategy :
@@ -16,79 +16,79 @@ 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 "::set-output name=sha::$(git rev-parse HEAD)"
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 : bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
73- - name : Ensure minimum required Chrome version
74- run : |
75- echo -e "Already installed $(google-chrome --version)\n"
76- MINIMUM_REQUIRED_CHROME_VERSION=75
77- INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
78- if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
79- wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
80- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
81- sudo apt-get update
82- sudo apt-get install google-chrome-stable
83- echo -e "\nInstalled $(google-chrome --version)"
84- fi
85- - name : Increase the amount of inotify watchers
86- run : echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
87- - name : Main CI
88- if : steps.changed-files.outputs.any_changed == 'true'
89- run : bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples
90- - name : Store test results
91- uses : actions/upload-artifact@v4
92- with :
93- name : main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
94- 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 "::set-output name=sha::$(git rev-parse HEAD)"
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 : bundle lock --add-platform 'x86_64-linux' && bundle check --path=vendor/bundle || bundle _2.5.9_ install --path=vendor/bundle --jobs=4 --retry=3
73+ - name : Ensure minimum required Chrome version
74+ run : |
75+ echo -e "Already installed $(google-chrome --version)\n"
76+ MINIMUM_REQUIRED_CHROME_VERSION=75
77+ INSTALLED_CHROME_MAJOR_VERSION="$(google-chrome --version | tr ' .' '\t' | cut -f3)"
78+ if [[ $INSTALLED_CHROME_MAJOR_VERSION < $MINIMUM_REQUIRED_CHROME_VERSION ]]; then
79+ wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
80+ sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
81+ sudo apt-get update
82+ sudo apt-get install google-chrome-stable
83+ echo -e "\nInstalled $(google-chrome --version)"
84+ fi
85+ - name : Increase the amount of inotify watchers
86+ run : echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
87+ - name : Main CI
88+ if : steps.changed-files.outputs.any_changed == 'true'
89+ run : bundle exec rake run_rspec:${{ matrix.versions == 'oldest' && 'web' || 'shaka' }}packer_examples
90+ - name : Store test results
91+ uses : actions/upload-artifact@v4
92+ with :
93+ name : main-rspec-${{ github.run_id }}-${{ github.job }}-${{ matrix.versions }}
94+ path : ~/rspec
0 commit comments