@@ -15,34 +15,34 @@ jobs:
1515 lint :
1616 runs-on : ubuntu-latest
1717 env :
18+ RUBY_VERSION : ruby-4.0.1
19+ RUBOCOP_CACHE_ROOT : tmp/rubocop
1820 APPRAISAL_NAME : rack_3
1921 BUNDLE_GEMFILE : ./gemfiles/rack_3.gemfile
2022 steps :
2123 - uses : actions/checkout@v2
2224 - uses : ruby/setup-ruby@v1
2325 with :
24- ruby-version : 3.0.0
25- - uses : actions/cache@v4
26+ ruby-version : ${{ env.RUBY_VERSION }}
27+ bundler-cache : true
28+ - uses : actions/cache@v5
29+ env :
30+ DEPENDENCIES_HASH : ${{ hashFiles('.rubocop.yml', '.rubocop_todo.yml', format('{0}.lock', env.BUNDLE_GEMFILE)) }}
2631 with :
27- path : vendor/bundle
28- key : bundle-use-ruby-ubuntu-latest-3.0.0-rack_3- ${{ hashFiles(format('{0}.lock', env.BUNDLE_GEMFILE)) }}
32+ path : ${{ env.RUBOCOP_CACHE_ROOT }}
33+ key : rubocop-${{ runner.os }}- ${{ env.RUBY_VERSION }}-${{ env.DEPENDENCIES_HASH }}-${{ github.ref_name == github.event.repository.default_branch && github.run_id || 'default' }}
2934 restore-keys : |
30- bundle-use-ruby-ubuntu-latest-3.0.0-rack_3
31- - name : bundle install
32- run : |
33- bundle config deployment true
34- bundle config path vendor/bundle
35- bundle install --jobs 4
35+ rubocop-${{ runner.os }}-${{ env.RUBY_VERSION }}-${{ env.DEPENDENCIES_HASH }}-
3636 - name : " Run rubocop"
3737 run : |
38- bin/rubocop
38+ bin/rubocop -f github
3939 rspec :
4040 runs-on : ubuntu-latest
4141 strategy :
4242 fail-fast : false
4343 matrix :
44- appraisal_name : [rack_2, rack_3, rails_6_0, rails_6_1 ]
45- ruby : [3.0.0 ]
44+ appraisal_name : [jwt_2, jwt_3, rack_2, rack_3, rails_7_1, rails_7_2, rails_8_0, rails_8_1 ]
45+ ruby : [3.4.7, 4.0.1 ]
4646 env :
4747 APPRAISAL_NAME : ${{ matrix.appraisal_name }}
4848 BUNDLE_GEMFILE : ${{ format('./gemfiles/{0}.gemfile', matrix.appraisal_name) }}
5151 - uses : ruby/setup-ruby@v1
5252 with :
5353 ruby-version : ${{ matrix.ruby }}
54- - uses : actions/cache@v4
55- with :
56- path : vendor/bundle
57- key : bundle-use-ruby-ubuntu-latest-${{ matrix.ruby }}-${{ env.APPRAISAL_NAME }}-${{ hashFiles(format('{0}.lock', env.BUNDLE_GEMFILE)) }}
58- restore-keys : |
59- bundle-use-ruby-ubuntu-latest-${{ matrix.ruby }}-${{ env.APPRAISAL_NAME }}
60- - name : bundle install
61- run : |
62- bundle config deployment true
63- bundle config path vendor/bundle
64- bundle install --jobs 4
54+ bundler-cache : true
6555 - name : " Run RSpec"
6656 run : |
6757 bin/rspec
0 commit comments