From 3a32dfd796176788a87a928dc4c229b36327a901 Mon Sep 17 00:00:00 2001 From: Simon Date: Mon, 13 Feb 2023 18:23:08 +0100 Subject: [PATCH] Add ruby 3.2 to CI (#1759) * Add ruby 3.2 to CI * Fix Timebomb spec * Log ruby versions on ci * Use new circle CI ruby image --- .circleci/config.yml | 10 +++++----- test/tests/rails7.rb | 13 +++++++++++-- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2fdd71d977..c537eeee52 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,7 +5,7 @@ jobs: - image: cimg/ruby:2.7 steps: - checkout - - run: bundle check || bundle install + - run: ruby --version && bundle check || bundle install - run: command: bundle exec rake - store_test_results: @@ -43,15 +43,15 @@ jobs: test-3-0: <<: *default docker: - - image: circleci/ruby:3.0 + - image: cimg/ruby:3.0 test-3-1: <<: *default docker: - image: cimg/ruby:3.1 - test-latest: + test-3-2: <<: *default docker: - - image: circleci/ruby:latest + - image: cimg/ruby:3.2 upload-coverage: <<: *default working_directory: ~/repo @@ -70,7 +70,7 @@ workflows: - test-2-6 - test-3-0 - test-3-1 - - test-latest + - test-3-2 - upload-coverage: requires: - test-2-5 diff --git a/test/tests/rails7.rb b/test/tests/rails7.rb index fad95e94d2..9ba73ce44a 100644 --- a/test/tests/rails7.rb +++ b/test/tests/rails7.rb @@ -5,7 +5,10 @@ class Rails7Tests < Minitest::Test include BrakemanTester::CheckExpected def report - @@report ||= BrakemanTester.run_scan "rails7", "Rails 7", :run_all_checks => true + @@report ||= + Date.stub :today, Date.parse('2023-02-10') do + BrakemanTester.run_scan "rails7", "Rails 7", :run_all_checks => true + end end def expected @@ -13,10 +16,16 @@ def expected :controller => 0, :model => 0, :template => 0, - :warning => 22 + :warning => 23 } end + def test_ruby_2_7_eol + assert_warning check_name: "EOLRuby", + message: "Support for Ruby 2.7.0 ends on 2023-03-31 near line 140", + fingerprint: "425dcb3af9624f11f12d777d6f9fe05995719975a155c30012baa6b9dc3487df" + end + def test_missing_encryption_1 assert_warning :type => :warning, :warning_code => 109,