Skip to content

Enable bundler-cache to cache gem dependencies#90

Merged
kou merged 3 commits intorr:masterfrom
mishina2228:cache-gem-dependencies
Apr 8, 2022
Merged

Enable bundler-cache to cache gem dependencies#90
kou merged 3 commits intorr:masterfrom
mishina2228:cache-gem-dependencies

Conversation

@mishina2228
Copy link
Contributor

@mishina2228 mishina2228 commented Apr 8, 2022

This PR enables bundler-cache in ruby/setup-ruby to speed up GitHub Action workflows.
And does the following:

  • Use Dir instead of Rake::FileList in gemspec
    • The following error occurred when bundler-cache was enabled.
      [!] There was an error parsing `Gemfile`: 
      [!] There was an error while loading `rr.gemspec`: cannot load such file -- rake. Bundler cannot continue.
      
       #  from /home/runner/work/rr/rr/rr.gemspec:3
       #  -------------------------------------------
       #  
       >  require 'rake'
       #  require File.expand_path('../lib/rr/version', __FILE__)
       #  -------------------------------------------
      . Bundler cannot continue.
      
       #  from /home/runner/work/rr/rr/Gemfile:3
       #  -------------------------------------------
       #  
       >  gemspec
       #  
       #  -------------------------------------------
      
    rake was required for FileList (Rake::FileList), but can be replaced by Dir.
  • Remove unmaintained .ruby-version
    • Deleted because it was an inconvenience to development.
    • 2.0.0-p195 was specified, but it's fairly outdated.

CI for truffleruby-head fails, but I don't think the change in this PR is relevant.

Print Ruby version
  /home/runner/.rubies/truffleruby-head/bin/ruby --version
  truffleruby 22.2.0-dev-9e904e73, like ruby 3.0.2, GraalVM CE Native [x86_64-linux]
  Took   0.02 seconds
/home/runner/.rubies/truffleruby-head/bin/truffleruby test/run-test.rb
Loaded suite test
Started
...............O
===============================================================================
Omission: Require Minitest [test: verify(TestIntegerationMinitest)]
/home/runner/work/rr/rr/test/integration/test_minitest.rb:3:in `setup_8024'
===============================================================================
O
===============================================================================
Omission: Require Active Support [test: verify(TestIntegerationMinitestActiveSupport)]
/home/runner/work/rr/rr/test/integration/test_minitest_active_support.rb:3:in `setup_8040'
===============================================================================
..............E
===============================================================================
Error: test: a, **b[style: :hash](TestMockProxyKwargs): ArgumentError: wrong number of arguments (given 2, expected 1)
/home/runner/work/rr/rr/test/mock/test_proxy_kwargs.rb:29:in `call'
/home/runner/work/rr/rr/test/mock/test_proxy_kwargs.rb:7:in `call_method'
/home/runner/work/rr/rr/test/mock/test_proxy_kwargs.rb:44:in `test: a, **b'
     41:         obj2.call(1, {a: 2})
     42:       end
     43:     else
  => 44:       assert_equal(call_method(obj1, data[:style]),
     45:                    call_method(obj2, data[:style]))
     46:     end
     47:   end
<internal:core> core/throw_catch.rb:36:in `catch'
<internal:core> core/throw_catch.rb:36:in `catch'
===============================================================================
.......
Finished in 0.38420000000000004 seconds.
-------------------------------------------------------------------------------
39 tests, 51 assertions, 0 failures, 1 errors, 0 pendings, 2 omissions, 0 notifications
97.2973% passed
-------------------------------------------------------------------------------
101.51 tests/s, 132.74 assertions/s
rake aborted!

@kou kou merged commit 0a3ff52 into rr:master Apr 8, 2022
@kou
Copy link
Member

kou commented Apr 8, 2022

Thanks!

@mishina2228 mishina2228 deleted the cache-gem-dependencies branch April 8, 2022 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants