-
Notifications
You must be signed in to change notification settings - Fork 0
120 lines (116 loc) · 3.41 KB
/
ruby.yml
File metadata and controls
120 lines (116 loc) · 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: Ruby
on:
push:
branches:
- master
paths:
- .github/actions/setup-ruby/action.yml
- .github/workflows/ruby.yml
- .ruby-version
- ruby/**/*.rb
- ruby/**/*.rbs
- ruby/Gemfile
- ruby/Gemfile.lock
- ruby/.rubocop.yml
- ruby/.rubocop_todo.yml
- ruby/Steepfile
pull_request:
paths:
- .github/actions/setup-ruby/action.yml
- .github/workflows/ruby.yml
- .ruby-version
- ruby/**/*.rb
- ruby/**/*.rbs
- ruby/Gemfile
- ruby/Gemfile.lock
- ruby/.rubocop.yml
- ruby/.rubocop_todo.yml
- ruby/Steepfile
permissions:
contents: read
pull-requests: read
jobs:
change-detection:
runs-on: ubuntu-latest
outputs:
ruby-changes: ${{ steps.change-detection.outputs.ruby }}
rubocop-changes: ${{ steps.change-detection.outputs.rubocop}}
steep-changes: ${{ steps.change-detection.outputs.steep}}
steps:
- uses: actions/checkout@v6
- name: Change Detection
uses: dorny/paths-filter@v4
id: change-detection
with:
filters: |
ruby:
- .github/actions/setup-ruby/action.yml
- .github/workflows/ruby.yml
- .ruby-version
- ruby/**/*.rb
- ruby/Gemfile
- ruby/Gemfile.lock
rubocop:
- .github/actions/setup-ruby/action.yml
- .github/workflows/ruby.yml
- .ruby-version
- ruby/**/*.rb
- ruby/Gemfile
- ruby/Gemfile.lock
- ruby/.rubocop.yml
- ruby/.rubocop_todo.yml
steep:
- .github/actions/setup-ruby/action.yml
- .github/workflows/ruby.yml
- .ruby-version
- ruby/**/*.rb
- ruby/**/*.rbs
- ruby/Gemfile
- ruby/Gemfile.lock
- ruby/Steepfile
minitest:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: change-detection
if: needs.change-detection.outputs.ruby-changes == 'true'
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-ruby
with:
job-name: minitest
- name: Minitest
working-directory: ./ruby
run: rake
rubocop:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: change-detection
if: needs.change-detection.outputs.rubocop-changes == 'true'
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-ruby
with:
job-name: rubocop
- name: RuboCop
working-directory: ./ruby
run: bundle exec rubocop
steep:
timeout-minutes: 10
runs-on: ubuntu-latest
needs: change-detection
if: needs.change-detection.outputs.steep-changes == 'true'
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-ruby
with:
job-name: steep
- name: Steep
working-directory: ./ruby
run: |
bundle exec steep check