@@ -35,94 +35,37 @@ jobs:
35
35
- " 3.4"
36
36
- ruby-head
37
37
- jruby-9.4
38
+ gemfile : [Gemfile]
38
39
task :
39
40
- internal_investigation
40
41
- spec
41
- name : " Ruby ${{ matrix.ruby }}: ${{ matrix.task }}"
42
- steps :
43
- - uses : actions/checkout@v5
44
- - uses : ruby/setup-ruby@v1
45
- with :
46
- ruby-version : " ${{ matrix.ruby }}"
47
- bundler-cache : true
48
- - run : NO_COVERAGE=true bundle exec rake ${{ matrix.task }}
42
+ include :
43
+ - {ruby: "3.4", gemfile: "gemfiles/oldest_rubocop.rb", task: spec}
44
+ - {ruby: "3.4", gemfile: "gemfiles/latest_rubocop.rb", task: internal_investigation}
45
+ - {ruby: "3.4", gemfile: "gemfiles/latest_rubocop.rb", task: spec}
46
+ - {ruby: "3.4", gemfile: "gemfiles/latest_rspec_4.rb", task: spec}
47
+ name : >
48
+ ${{ matrix.gemfile == 'Gemfile' &&
49
+ "Ruby ${{ matrix.ruby }}: ${{ matrix.task }}" ||
50
+ "${{ matrix.task }} with ${{ matrix.gemfile }}"
51
+ }}
49
52
50
- coverage :
51
- runs-on : ubuntu-latest
52
- name : " Test coverage"
53
+ env :
54
+ BUNDLE_GEMFILE : ${{ matrix.gemfile }}
53
55
steps :
54
56
- uses : actions/checkout@v5
55
57
- uses : ruby/setup-ruby@v1
56
58
with :
57
- ruby-version : " 3.4"
58
- bundler-cache : true
59
- - run : bundle exec rake spec
60
-
61
- edge-rubocop :
62
- runs-on : ubuntu-latest
63
- strategy :
64
- matrix :
65
- task :
66
- - internal_investigation
67
- - spec
68
- name : " Edge RuboCop: ${{ matrix.task }}"
69
- steps :
70
- - uses : actions/checkout@v5
71
- - name : Use latest RuboCop from `master`
72
- run : |
73
- echo "gem 'rubocop', github: 'rubocop/rubocop'" > Gemfile.local
74
- cat Gemfile.local
75
- - uses : ruby/setup-ruby@v1
76
- with :
77
- ruby-version : " 3.4"
78
- bundler-cache : true
79
- - name : Show RuboCop version
80
- run : grep '^ rubocop' Gemfile.lock | sort
81
- - run : NO_COVERAGE=true bundle exec rake ${{ matrix.task }}
82
-
83
- oldest-rubocop :
84
- runs-on : ubuntu-latest
85
- strategy :
86
- matrix :
87
- task :
88
- - spec
89
- name : " Oldest RuboCop: ${{ matrix.task }}"
90
- steps :
91
- - uses : actions/checkout@v5
92
- - name : Use oldest RuboCop allowed by gemspec
93
- run : |
94
- sed -nr "s/ *spec.add_dependency 'rubocop'.*'>= ([0-9\.]+)'/gem 'rubocop', '= \1'/p" \
95
- rubocop-rspec.gemspec > Gemfile.local
96
- cat Gemfile.local
97
- - uses : ruby/setup-ruby@v1
98
- with :
99
- ruby-version : " 3.4"
59
+ ruby-version : " ${{ matrix.ruby }}"
100
60
bundler-cache : true
61
+ - name : Show Gemfile for debugging
62
+ if : ${{ matrix.gemfile }} != 'Gemfile'
63
+ run : cat $BUNDLE_GEMFILE
101
64
- name : Show RuboCop version
102
- run : grep '^ rubocop' Gemfile.lock | sort
65
+ if : ${{ matrix.gemfile }} != 'Gemfile'
66
+ run : grep '^ rubocop' $BUNDLE_GEMFILE.lock | sort
103
67
- run : NO_COVERAGE=true bundle exec rake ${{ matrix.task }}
104
68
105
- rspec4 :
106
- runs-on : ubuntu-latest
107
- name : RSpec 4
108
- steps :
109
- - uses : actions/checkout@v5
110
- - name : Use latest RSpec 4 from `4-0-dev` branch
111
- run : |
112
- sed -e '/rspec/d' -i Gemfile
113
- cat << EOF > Gemfile.local
114
- gem 'rspec', github: 'rspec/rspec', branch: '4-0-dev'
115
- gem 'rspec-core', github: 'rspec/rspec', branch: '4-0-dev'
116
- gem 'rspec-expectations', github: 'rspec/rspec', branch: '4-0-dev'
117
- gem 'rspec-mocks', github: 'rspec/rspec', branch: '4-0-dev'
118
- gem 'rspec-support', github: 'rspec/rspec', branch: '4-0-dev'
119
- EOF
120
- - uses : ruby/setup-ruby@v1
121
- with :
122
- ruby-version : " 3.4"
123
- bundler-cache : true
124
- - run : NO_COVERAGE=true bundle exec rake spec
125
-
126
69
prism :
127
70
runs-on : ubuntu-latest
128
71
name : Prism
0 commit comments