File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -83,14 +83,23 @@ jobs:
8383 runs-on : ubuntu-latest
8484 steps :
8585 - uses : actions/checkout@v2
86+ - name : Get changed files
87+ id : changed-files
88+ uses : tj-actions/changed-files@v39
89+ with :
90+ files : |
91+ **/*.rb
8692 - name : Set up Ruby
93+ if : steps.changed-files.outputs.any_changed == 'true'
8794 uses : ruby/setup-ruby@v1
8895 with :
8996 ruby-version : ${{ env.RUBY_VERSION }}
9097 - name : Install dependencies
98+ if : steps.changed-files.outputs.any_changed == 'true'
9199 run : bundle install
92100 - name : Run RuboCop
93- run : bundle exec rake rubocop
101+ if : steps.changed-files.outputs.any_changed == 'true'
102+ run : bundle exec rubocop ${{ steps.changed-files.outputs.all_changed_files }}
94103
95104 tests :
96105 permissions : write-all
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ require 'English'
55::Gem ::Specification . new do |s |
66 s . required_ruby_version = '>= 3.0'
77 s . name = 'leetcode-ruby'
8- s . version = '8.2.5.7 '
8+ s . version = '8.2.5.8 '
99 s . license = 'MIT'
1010 s . files = ::Dir [ 'lib/**/*.rb' ] + %w[ README.md ]
1111 s . executable = 'leetcode-ruby'
You can’t perform that action at this time.
0 commit comments