Commit e4bba8c
authored
Improve and fix CI (#439)
* Add Ruby3.4 to CI matrix
* Upgrade actions/checkout to the latest version
* Fix the CI failure on Ruby versions below 2.7
When using older Rails together with concurrent-ruby version 1.3.5 or higher, Rails fails to start as shown. I addressed this by using a concurrent-ruby version below 1.3.5.
```
ruby test/timecop_with_active_support_test.rb
/home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:16:in `<module:LoggerThreadSafeLevel>': uninitialized constant ActiveSupport::LoggerThreadSafeLevel::Logger (NameError)
from /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:9:in `<module:ActiveSupport>'
from /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/logger_thread_safe_level.rb:8:in `<top (required)>'
from /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/logger_silence.rb:5:in `require'
from /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/logger_silence.rb:5:in `<top (required)>'
from /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/logger.rb:3:in `require'
from /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/logger.rb:3:in `<top (required)>'
from /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support.rb:29:in `require'
from /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support.rb:29:in `<top (required)>'
from /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/all.rb:3:in `require'
from /home/runner/work/timecop/timecop/vendor/bundle/ruby/2.6.0/gems/activesupport-6.1.7.10/lib/active_support/all.rb:3:in `<top (required)>'
from test/timecop_with_active_support_test.rb:4:in `require'
from test/timecop_with_active_support_test.rb:4:in `<main>'
```
* Fix the CI failure on Ruby 3.5
When running CI on Ruby 3.5, it fails as shown. As the error message indicates, rdoc was removed from the standard library, which caused the tests to fail. I fixed this by adding rdoc to the Gemfile.
```
/home/runner/work/timecop/timecop/Rakefile:4: warning: rdoc/task is found in rdoc, which is not part of the default gems since Ruby 3.5.0.
You can add rdoc to your Gemfile or gemspec to fix this error.
rake aborted!
LoadError: cannot load such file -- rdoc/task (LoadError)
/home/runner/work/timecop/timecop/Rakefile:4:in '<top (required)>'
/home/runner/work/timecop/timecop/vendor/bundle/ruby/3.5.0+4/gems/rake-13.3.1/exe/rake:27:in '<top (required)>'
/home/runner/.rubies/ruby-head/bin/bundle:25:in '<main>'
(See full trace by running task with --trace)
```1 parent d695c6f commit e4bba8c
2 files changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
30 | 31 | | |
31 | 32 | | |
32 | 33 | | |
33 | | - | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments