Skip to content

Commit

Permalink
Add ruby 3.2 to CI (#1759)
Browse files Browse the repository at this point in the history
* Add ruby 3.2 to CI
* Fix Timebomb spec
* Log ruby versions on ci
* Use new circle CI ruby image
  • Loading branch information
stoivo authored Feb 13, 2023
1 parent 72327f7 commit 3a32dfd
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
10 changes: 5 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
13 changes: 11 additions & 2 deletions test/tests/rails7.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,27 @@ 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
@@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,
Expand Down

0 comments on commit 3a32dfd

Please sign in to comment.