@@ -35,94 +35,32 @@ 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
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}
41
47
name : " Ruby ${{ matrix.ruby }}: ${{ matrix.task }}"
48
+ env :
49
+ BUNDLE_GEMFILE : ${{ matrix.gemfile }}
42
50
steps :
43
51
- uses : actions/checkout@v5
44
52
- uses : ruby/setup-ruby@v1
45
53
with :
46
54
ruby-version : " ${{ matrix.ruby }}"
47
55
bundler-cache : true
48
- - run : NO_COVERAGE=true bundle exec rake ${{ matrix.task }}
49
-
50
- coverage :
51
- runs-on : ubuntu-latest
52
- name : " Test coverage"
53
- steps :
54
- - uses : actions/checkout@v5
55
- - uses : ruby/setup-ruby@v1
56
- 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
56
+ - name : Show Gemfile for debugging
57
+ if : ${{ matrix.gemfile }} != 'Gemfile'
58
+ run : cat $BUNDLE_GEMFILE
79
59
- name : Show RuboCop version
80
- run : grep '^ rubocop' Gemfile.lock | sort
60
+ if : ${{ matrix.gemfile }} != 'Gemfile'
61
+ run : grep '^ rubocop' $BUNDLE_GEMFILE.lock | sort
81
62
- run : NO_COVERAGE=true bundle exec rake ${{ matrix.task }}
82
63
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"
100
- bundler-cache : true
101
- - name : Show RuboCop version
102
- run : grep '^ rubocop' Gemfile.lock | sort
103
- - run : NO_COVERAGE=true bundle exec rake ${{ matrix.task }}
104
-
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
64
prism :
127
65
runs-on : ubuntu-latest
128
66
name : Prism
0 commit comments