Skip to content

Commit 91f450e

Browse files
authored
Run Rubocop only once in CI (#1087)
No need to keep running rubocop, can esp. even be a bit slow on JRuby
1 parent 0c27173 commit 91f450e

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

.github/workflows/stable.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,17 @@ jobs:
2929
ruby-version: ${{ matrix.ruby-version }}
3030
bundler-cache: true
3131

32+
- name: Run Rubocop
33+
run: bundle exec rake rubocop
34+
# code style is enough to check once (and might even take some time on JRuby)
35+
if: matrix.ruby-version == '3.3'
36+
3237
- name: Run tests
33-
run: bundle exec rake
38+
run: bundle exec rake test
3439
if: matrix.ruby-version != 'truffleruby'
3540

36-
# Run only `rake spec` on truffleruby, because just `rake` runs `rubocop spec cucumber`.
37-
# There is no value to rerun rubocop here.
38-
# cucumber fails because it uses an old childprocess which depends on fork.
41+
# Run only `rake spec` on truffleruby, because just `rake` runs cucumber
42+
# which fails because it uses an old childprocess which depends on fork.
3943
- name: Run specs (truffleruby)
4044
run: bundle exec rake spec
4145
if: matrix.ruby-version == 'truffleruby'

.github/workflows/unstable.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,11 @@ jobs:
2828
bundler-cache: true
2929

3030
- name: Run tests
31-
run: bundle exec rake
31+
run: bundle exec rake test
3232
if: matrix.ruby-version != 'truffleruby-head'
3333

34-
# Run only `rake spec` on truffleruby, because just `rake` runs `rubocop spec cucumber`.
35-
# There is no value to rerun rubocop here.
36-
# cucumber fails because it uses an old childprocess which depends on fork.
34+
# Run only `rake spec` on truffleruby, because just `rake` runs cucumber
35+
# which fails because it uses an old childprocess which depends on fork.
3736
- name: Run specs (truffleruby)
3837
run: bundle exec rake spec
3938
if: matrix.ruby-version == 'truffleruby-head'

Rakefile

+1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ Cucumber::Rake::Task.new do |t|
2929
t.cucumber_opts = %w[--retry 3 --no-strict-flaky]
3030
end
3131

32+
task test: %i[spec cucumber]
3233
task default: %i[rubocop spec cucumber]

0 commit comments

Comments
 (0)