Skip to content

Commit 502c8f5

Browse files
authored
Merge pull request #31 from hayat01sh1da/hayat01sh1da/ruby/fix-invalid-paths-filters-on-github-actions
[ruby] Fix Invalid Paths Filters on GitHub Actions
2 parents 7c6e43f + b29ab25 commit 502c8f5

7 files changed

Lines changed: 40 additions & 58 deletions

File tree

.github/actions/setup-ruby/action.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ runs:
1515
with:
1616
bundler-cache: true
1717
- name: Bundle Install with Caching
18-
if: ${{ inputs.job-name != 'Minitest' }}
18+
if: ${{ inputs.job-name != 'minitest' }}
1919
shell: bash
2020
working-directory: ./ruby
2121
run: |
22-
bundle config set path vendor/bundle
23-
bundle install --with=${{ inputs.job-name }}
22+
rm -rf .bundle/**
23+
bundle config set --local with ${{ inputs.job-name }}
24+
bundle install
2425
bundle lock --add-checksums

.github/workflows/ruby.yml

Lines changed: 31 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -43,41 +43,41 @@ jobs:
4343
change-detection:
4444
runs-on: ubuntu-latest
4545
outputs:
46-
ruby-changes: ${{ steps.ruby.outputs.changes }}
47-
rubocop-changes: ${{ steps.rubocop.outputs.changes }}
48-
steep-changes: ${{ steps.steep.outputs.changes }}
46+
ruby-changes: ${{ steps.change-detection.outputs.ruby }}
47+
rubocop-changes: ${{ steps.change-detection.outputs.rubocop}}
48+
steep-changes: ${{ steps.change-detection.outputs.steep}}
4949
steps:
5050
- uses: actions/checkout@v6
5151
- name: Change Detection
5252
uses: dorny/paths-filter@v4
5353
id: change-detection
5454
with:
5555
filters: |
56-
ruby: |
57-
.github/actions/setup-ruby/action.yml
58-
.github/workflows/ruby.yml
59-
.ruby-version
60-
ruby/**/*.rb
61-
ruby/Gemfile
62-
ruby/Gemfile.lock
63-
rubocop: |
64-
.github/actions/setup-ruby/action.yml
65-
.github/workflows/ruby.yml
66-
.ruby-version
67-
ruby/**/*.rb
68-
ruby/Gemfile
69-
ruby/Gemfile.lock
70-
ruby/rubocop.yml
71-
ruby/rubocop_todo.yml
72-
steep: |
73-
.github/actions/setup-ruby/action.yml
74-
.github/workflows/ruby.yml
75-
.ruby-version
76-
ruby/**/*.rb
77-
ruby/**/*.rbs
78-
ruby/Gemfile
79-
ruby/Gemfile.lock
80-
ruby/Steepfile
56+
ruby:
57+
- .github/actions/setup-ruby/action.yml
58+
- .github/workflows/ruby.yml
59+
- .ruby-version
60+
- ruby/**/*.rb
61+
- ruby/Gemfile
62+
- ruby/Gemfile.lock
63+
rubocop:
64+
- .github/actions/setup-ruby/action.yml
65+
- .github/workflows/ruby.yml
66+
- .ruby-version
67+
- ruby/**/*.rb
68+
- ruby/Gemfile
69+
- ruby/Gemfile.lock
70+
- ruby/rubocop.yml
71+
- ruby/rubocop_todo.yml
72+
steep:
73+
- .github/actions/setup-ruby/action.yml
74+
- .github/workflows/ruby.yml
75+
- .ruby-version
76+
- ruby/**/*.rb
77+
- ruby/**/*.rbs
78+
- ruby/Gemfile
79+
- ruby/Gemfile.lock
80+
- ruby/Steepfile
8181
minitest:
8282
timeout-minutes: 10
8383
runs-on: ubuntu-latest
@@ -87,23 +87,10 @@ jobs:
8787
- uses: actions/checkout@v6
8888
- uses: ./.github/actions/setup-ruby
8989
with:
90-
job-name: Minitest
90+
job-name: minitest
9191
- name: Minitest
9292
working-directory: ./ruby
9393
run: ruby test/application_test.rb
94-
brakeman:
95-
timeout-minutes: 10
96-
runs-on: ubuntu-latest
97-
needs: change-detection
98-
if: needs.change-detection.outputs.ruby-changes == 'true'
99-
steps:
100-
- uses: actions/checkout@v6
101-
- uses: ./.github/actions/setup-ruby
102-
with:
103-
job-name: Brakeman
104-
- name: Brakeman
105-
working-directory: ./ruby
106-
run: bundle exec brakeman --no-pager
10794
rubocop:
10895
timeout-minutes: 10
10996
runs-on: ubuntu-latest
@@ -113,7 +100,7 @@ jobs:
113100
- uses: actions/checkout@v6
114101
- uses: ./.github/actions/setup-ruby
115102
with:
116-
job-name: RuboCop
103+
job-name: rubocop
117104
- name: RuboCop
118105
working-directory: ./ruby
119106
run: bundle exec rubocop
@@ -126,7 +113,7 @@ jobs:
126113
- uses: actions/checkout@v6
127114
- uses: ./.github/actions/setup-ruby
128115
with:
129-
job-name: Steep
116+
job-name: steep
130117
- name: Steep
131118
working-directory: ./ruby
132119
run: |

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4.0.2
1+
4.0.3

ruby/.rubocop_todo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2026-04-20 10:38:14 UTC using RuboCop version 1.86.1.
3+
# on 2026-04-22 16:23:17 UTC using RuboCop version 1.86.1.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new

ruby/Gemfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
1-
source 'https://rubygems.org'
1+
# frozen_string_literal: true
22

3-
group :brakeman do
4-
gem 'brakeman', '~> 8.0.4', require: false
5-
end
3+
source 'https://rubygems.org'
64

75
group :rubocop do
86
gem 'rubocop', '~> 1.86.1', require: false

ruby/Gemfile.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44
ast (2.4.3)
5-
brakeman (8.0.4)
6-
racc
75
concurrent-ruby (1.3.6)
86
csv (3.3.5)
97
ffi (1.17.4-x86_64-linux-gnu)
@@ -87,7 +85,6 @@ PLATFORMS
8785
x86_64-linux-gnu
8886

8987
DEPENDENCIES
90-
brakeman (~> 8.0.4)
9188
rbs-inline (~> 0.13.0)
9289
rubocop (~> 1.86.1)
9390
rubocop-minitest (~> 0.39.1)
@@ -96,7 +93,6 @@ DEPENDENCIES
9693

9794
CHECKSUMS
9895
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
99-
brakeman (8.0.4) sha256=7bf921fa9638544835df9aa7b3e720a9a72c0267f34f92135955edd80d4dcf6f
10096
concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab
10197
csv (3.3.5) sha256=6e5134ac3383ef728b7f02725d9872934f523cb40b961479f69cf3afa6c8e73f
10298
ffi (1.17.4-x86_64-linux-gnu) sha256=9d3db14c2eae074b382fa9c083fe95aec6e0a1451da249eab096c34002bc752d

ruby/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
## 2. Install Gems via Gemfile and Bundler
66

77
```command
8-
$ bundle config set path vendor/bundle
8+
$ bundle config set --local path vendor/bundle
99
$ bundle install
1010
$ bundle lock --add-checksums
1111
```

0 commit comments

Comments
 (0)