Skip to content

Commit 7ec29bc

Browse files
committed
Merge branch 'master' of https://github.com/fartem/leetcode-ruby into tests-5
2 parents 280ccd1 + 5b4904f commit 7ec29bc

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/checks.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)