Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Rubocop only once in CI #1087

Merged
merged 2 commits into from
Apr 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 8 additions & 4 deletions .github/workflows/stable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,17 @@ jobs:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Run Rubocop
run: bundle exec rake rubocop
# code style is enough to check once (and might even take some time on JRuby)
if: matrix.ruby-version == '3.3'

- name: Run tests
run: bundle exec rake
run: bundle exec rake test
if: matrix.ruby-version != 'truffleruby'

# Run only `rake spec` on truffleruby, because just `rake` runs `rubocop spec cucumber`.
# There is no value to rerun rubocop here.
# cucumber fails because it uses an old childprocess which depends on fork.
# Run only `rake spec` on truffleruby, because just `rake` runs cucumber
# which fails because it uses an old childprocess which depends on fork.
- name: Run specs (truffleruby)
run: bundle exec rake spec
if: matrix.ruby-version == 'truffleruby'
7 changes: 3 additions & 4 deletions .github/workflows/unstable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,11 @@ jobs:
bundler-cache: true

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

# Run only `rake spec` on truffleruby, because just `rake` runs `rubocop spec cucumber`.
# There is no value to rerun rubocop here.
# cucumber fails because it uses an old childprocess which depends on fork.
# Run only `rake spec` on truffleruby, because just `rake` runs cucumber
# which fails because it uses an old childprocess which depends on fork.
- name: Run specs (truffleruby)
run: bundle exec rake spec
if: matrix.ruby-version == 'truffleruby-head'
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ Cucumber::Rake::Task.new do |t|
t.cucumber_opts = %w[--retry 3 --no-strict-flaky]
end

task test: %i[spec cucumber]
task default: %i[rubocop spec cucumber]