From ef7409f5583474b9867a275f0dd2bb8228ae57c8 Mon Sep 17 00:00:00 2001 From: Judah Meek Date: Mon, 13 Nov 2023 16:02:46 -0600 Subject: [PATCH 1/7] upgrade puma to 6.x --- Gemfile.development_dependencies | 2 +- spec/dummy/Gemfile.lock | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Gemfile.development_dependencies b/Gemfile.development_dependencies index 74352b14a..65788ee43 100644 --- a/Gemfile.development_dependencies +++ b/Gemfile.development_dependencies @@ -7,7 +7,7 @@ gem "sqlite3" gem "sass-rails", "~> 6.0" gem "uglifier" gem "jquery-rails" -gem "puma", "~> 5.0" +gem "puma", "~> 6.0" gem "bundler", "2.4.17" # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks diff --git a/spec/dummy/Gemfile.lock b/spec/dummy/Gemfile.lock index 4a9e785e1..6e57136c2 100644 --- a/spec/dummy/Gemfile.lock +++ b/spec/dummy/Gemfile.lock @@ -186,7 +186,7 @@ GEM psych (5.1.0) stringio public_suffix (5.0.3) - puma (5.6.6) + puma (6.4.0) nio4r (~> 2.0) racc (1.7.1) rack (2.2.8) @@ -298,7 +298,7 @@ GEM sass (~> 3.5, >= 3.5.5) sdoc (2.6.1) rdoc (>= 5.0) - selenium-webdriver (4.11.0) + selenium-webdriver (4.9.0) rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) @@ -370,15 +370,15 @@ DEPENDENCIES pry-doc pry-rails pry-rescue - puma (~> 5.0) + puma (~> 6.0) rails (~> 7.0, >= 7.0.1) react_on_rails! rspec-rails rspec-retry rspec_junit_formatter rubocop (~> 1.56) - rubocop-performance - rubocop-rspec + rubocop-performance (~> 1.18.0) + rubocop-rspec (~> 2.23.2) sass-rails (~> 6.0) scss_lint sdoc From cedbe135df007908ed1de3643e5a8c2de9ec76a2 Mon Sep 17 00:00:00 2001 From: Judah Meek Date: Mon, 13 Nov 2023 16:10:38 -0600 Subject: [PATCH 2/7] linting fix --- .../server_rendering_pool/ruby_embedded_java_script.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb b/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb index 0a8093a9f..d1e7212d8 100644 --- a/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb +++ b/lib/react_on_rails/server_rendering_pool/ruby_embedded_java_script.rb @@ -5,8 +5,8 @@ module ReactOnRails module ServerRenderingPool + # rubocop:disable Metrics/ClassLength class RubyEmbeddedJavaScript - # rubocop:disable Metrics/ClassLength class << self def reset_pool options = { From a71962f8cae20681da644924cc7400349da64c3b Mon Sep 17 00:00:00 2001 From: Judah Meek Date: Mon, 13 Nov 2023 16:27:22 -0600 Subject: [PATCH 3/7] restrict push workflows to master --- .github/workflows/main.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3a05710d1..f754b34bf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,10 @@ name: Main test -on: [push, pull_request] +on: + push: + branches: + - 'master' + pull_request jobs: build-dummy-app-webpack-test-bundles: From 16cfc19a967332a50c19bc47049040981c3df36e Mon Sep 17 00:00:00 2001 From: Judah Meek Date: Mon, 13 Nov 2023 16:47:48 -0600 Subject: [PATCH 4/7] maintain support for Ruby v2 in test environment --- Gemfile.development_dependencies | 3 ++- spec/dummy/Gemfile.lock | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Gemfile.development_dependencies b/Gemfile.development_dependencies index 65788ee43..e05477d61 100644 --- a/Gemfile.development_dependencies +++ b/Gemfile.development_dependencies @@ -46,5 +46,6 @@ group :test do gem "rspec_junit_formatter" gem "rspec-rails" gem "rspec-retry" - gem "selenium-webdriver" + gem "selenium-webdriver", "4.9.0" + gem "webdrivers", "5.3.0" end diff --git a/spec/dummy/Gemfile.lock b/spec/dummy/Gemfile.lock index 6e57136c2..def2fa5e7 100644 --- a/spec/dummy/Gemfile.lock +++ b/spec/dummy/Gemfile.lock @@ -340,6 +340,10 @@ GEM uglifier (4.2.0) execjs (>= 0.3.0, < 3) unicode-display_width (2.4.2) + webdrivers (5.3.0) + nokogiri (~> 1.6) + rubyzip (>= 1.3.0) + selenium-webdriver (~> 4.0, < 4.11) websocket (1.2.9) websocket-driver (0.7.6) websocket-extensions (>= 0.1.0) @@ -382,13 +386,14 @@ DEPENDENCIES sass-rails (~> 6.0) scss_lint sdoc - selenium-webdriver + selenium-webdriver (= 4.9.0) shakapacker (= 7.0.1) spring (~> 4.0) sprockets (~> 4.0) sqlite3 turbolinks uglifier + webdrivers (= 5.3.0) BUNDLED WITH 2.4.17 From 6f7269ad1950d4ba8d1a735beef2d08100f044fb Mon Sep 17 00:00:00 2001 From: Judah Meek Date: Mon, 13 Nov 2023 17:00:27 -0600 Subject: [PATCH 5/7] restrict push workflows to master (fix) --- .github/workflows/lint-js-and-ruby.yml | 9 ++++++++- .github/workflows/main.yml | 4 +++- .github/workflows/package-js-tests.yml | 9 ++++++++- .github/workflows/rspec-package-specs.yml | 8 +++++++- 4 files changed, 26 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint-js-and-ruby.yml b/.github/workflows/lint-js-and-ruby.yml index d15a437ba..74b4e02b4 100644 --- a/.github/workflows/lint-js-and-ruby.yml +++ b/.github/workflows/lint-js-and-ruby.yml @@ -1,6 +1,13 @@ name: Lint JS and Ruby -on: [push, pull_request] + +on: + push: + branches: + - 'master' + pull_request: + paths: + - '**.*' jobs: build: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f754b34bf..a1ae72ee3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,7 +4,9 @@ on: push: branches: - 'master' - pull_request + pull_request: + paths: + - '**.*' jobs: build-dummy-app-webpack-test-bundles: diff --git a/.github/workflows/package-js-tests.yml b/.github/workflows/package-js-tests.yml index 3a588eaab..799313282 100644 --- a/.github/workflows/package-js-tests.yml +++ b/.github/workflows/package-js-tests.yml @@ -1,6 +1,13 @@ name: JS unit tests for Renderer package -on: [push, pull_request] + +on: + push: + branches: + - 'master' + pull_request: + paths: + - '**.*' jobs: build: diff --git a/.github/workflows/rspec-package-specs.yml b/.github/workflows/rspec-package-specs.yml index a31a4ea42..47a6fa04b 100644 --- a/.github/workflows/rspec-package-specs.yml +++ b/.github/workflows/rspec-package-specs.yml @@ -1,6 +1,12 @@ name: Rspec test for gem -on: [push, pull_request] +on: + push: + branches: + - 'master' + pull_request: + paths: + - '**.*' jobs: build: From 7dc710323abb126829670ca35156129cc2465512 Mon Sep 17 00:00:00 2001 From: Judah Meek Date: Mon, 13 Nov 2023 17:43:43 -0600 Subject: [PATCH 6/7] add required workflows --- .github/workflows/lint-js-and-ruby.yml | 2 -- .github/workflows/main.yml | 8 +++----- .github/workflows/package-js-tests.yml | 4 +--- .github/workflows/rspec-package-specs.yml | 4 +--- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/.github/workflows/lint-js-and-ruby.yml b/.github/workflows/lint-js-and-ruby.yml index 74b4e02b4..1967538bd 100644 --- a/.github/workflows/lint-js-and-ruby.yml +++ b/.github/workflows/lint-js-and-ruby.yml @@ -6,8 +6,6 @@ on: branches: - 'master' pull_request: - paths: - - '**.*' jobs: build: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a1ae72ee3..fd99b6108 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,15 +5,13 @@ on: branches: - 'master' pull_request: - paths: - - '**.*' jobs: build-dummy-app-webpack-test-bundles: strategy: matrix: ruby: [2.7, 3.2] - node: [16, 18] + node: [14, 16, 18] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -85,8 +83,8 @@ jobs: needs: build-dummy-app-webpack-test-bundles strategy: matrix: - ruby: [2.7] - node: [14] + ruby: [2.7, 3.2] + node: [14, 16, 18] rake_task: ['run_rspec:all_but_examples', 'run_rspec:examples'] runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/package-js-tests.yml b/.github/workflows/package-js-tests.yml index 799313282..a68ed6447 100644 --- a/.github/workflows/package-js-tests.yml +++ b/.github/workflows/package-js-tests.yml @@ -6,14 +6,12 @@ on: branches: - 'master' pull_request: - paths: - - '**.*' jobs: build: strategy: matrix: - node: [16, 18] + node: [14, 16, 18] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/rspec-package-specs.yml b/.github/workflows/rspec-package-specs.yml index 47a6fa04b..fb0dd7ab0 100644 --- a/.github/workflows/rspec-package-specs.yml +++ b/.github/workflows/rspec-package-specs.yml @@ -5,15 +5,13 @@ on: branches: - 'master' pull_request: - paths: - - '**.*' jobs: build: strategy: matrix: ruby: [2.7, 3.2] - node: [16, 18] + node: [14, 16, 18] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 From ac8e2116a2156c5220d698087fb8a142484e472e Mon Sep 17 00:00:00 2001 From: Judah Meek Date: Wed, 15 Nov 2023 08:45:21 -0600 Subject: [PATCH 7/7] only test newest/oldest node versions --- .github/workflows/lint-js-and-ruby.yml | 2 +- .github/workflows/main.yml | 4 ++-- .github/workflows/package-js-tests.yml | 2 +- .github/workflows/rspec-package-specs.yml | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/lint-js-and-ruby.yml b/.github/workflows/lint-js-and-ruby.yml index 1967538bd..026551ca4 100644 --- a/.github/workflows/lint-js-and-ruby.yml +++ b/.github/workflows/lint-js-and-ruby.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: ruby: [3] - node: [18] + node: [20] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fd99b6108..f8e60e1ac 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: ruby: [2.7, 3.2] - node: [14, 16, 18] + node: [14, 20] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 @@ -84,7 +84,7 @@ jobs: strategy: matrix: ruby: [2.7, 3.2] - node: [14, 16, 18] + node: [14, 20] rake_task: ['run_rspec:all_but_examples', 'run_rspec:examples'] runs-on: ubuntu-22.04 steps: diff --git a/.github/workflows/package-js-tests.yml b/.github/workflows/package-js-tests.yml index a68ed6447..99428560b 100644 --- a/.github/workflows/package-js-tests.yml +++ b/.github/workflows/package-js-tests.yml @@ -11,7 +11,7 @@ jobs: build: strategy: matrix: - node: [14, 16, 18] + node: [14, 20] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/rspec-package-specs.yml b/.github/workflows/rspec-package-specs.yml index fb0dd7ab0..1e5bc0592 100644 --- a/.github/workflows/rspec-package-specs.yml +++ b/.github/workflows/rspec-package-specs.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: ruby: [2.7, 3.2] - node: [14, 16, 18] + node: [14, 20] runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v4