Skip to content

Commit

Permalink
Use GitHub Actions instead of CircleCI for JRuby matrix
Browse files Browse the repository at this point in the history
This is an update similar to #10326.

https://hub.docker.com/r/circleci/jruby hasn't been updated in a while.

This PR migrates the JRuby CI matrix from CircleCI to GitHub Actions to
keep up with the latest JRuby version.
  • Loading branch information
koic committed Aug 30, 2022
1 parent a63fd6d commit db4fa07
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 41 deletions.
39 changes: 1 addition & 38 deletions .circleci/config.yml
Expand Up @@ -2,11 +2,6 @@
# Please keep /.mergify.yml synced!
version: 2

jruby_env: &jruby_env
# By default we have 2 CPUs and 4GB ram available
# https://circleci.com/docs/2.0/configuration-reference/#resource_class
JRUBY_OPTS: "--debug -J-Xmn1024m -J-Xms2048m -J-Xmx2048m"

common_env: &common_env
# CircleCI container has two cores, but Ruby can see 32 cores. So we
# configure test-queue.
Expand Down Expand Up @@ -161,32 +156,6 @@ jobs:
steps:
*rubocop_steps

# JRuby 9.3
jruby-9.3-spec:
docker:
- image: circleci/jruby:9.3
environment:
<<: *common_env
<<: *jruby_env
steps:
*spec_steps
jruby-9.3-ascii_spec:
docker:
- image: circleci/jruby:9.3
environment:
<<: *common_env
<<: *jruby_env
steps:
*ascii_spec_steps
jruby-9.3-rubocop:
docker:
- image: circleci/jruby:9.3
environment:
<<: *common_env
<<: *jruby_env
steps:
*rubocop_steps

# Job for downloading the Code Climate test reporter
cc-setup:
docker:
Expand Down Expand Up @@ -221,7 +190,7 @@ jobs:
- run:
name: Upload coverage results to Code Climate
command: |
./tmp/cc-test-reporter sum-coverage tmp/codeclimate.*.json --parts 5 --output tmp/codeclimate.total.json
./tmp/cc-test-reporter sum-coverage tmp/codeclimate.*.json --parts 4 --output tmp/codeclimate.total.json
./tmp/cc-test-reporter upload-coverage --input tmp/codeclimate.total.json
# Miscellaneous tasks
Expand Down Expand Up @@ -272,16 +241,10 @@ workflows:
- cc-setup
- ruby-head-ascii_spec
- ruby-head-rubocop
- jruby-9.3-spec:
requires:
- cc-setup
- jruby-9.3-ascii_spec
- jruby-9.3-rubocop

- cc-upload-coverage:
requires:
- ruby-2.6-spec
- ruby-2.7-spec
- ruby-3.0-spec
- ruby-3.1-spec
- jruby-9.3-spec
20 changes: 20 additions & 0 deletions .github/workflows/rubocop.yml
Expand Up @@ -53,6 +53,26 @@ jobs:
- name: internal_investigation
run: bundle exec rake internal_investigation

jruby:
name: JRuby 9.3
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: jruby-9.3

- name: install dependencies
run: bundle install --jobs 3 --retry 3
- name: spec
run: bundle exec rake spec
- name: ascii_spec
run: bundle exec rake ascii_spec
- name: internal_investigation
run: bundle exec rake internal_investigation

rspec4:
runs-on: ubuntu-latest
name: RSpec 4
Expand Down
4 changes: 1 addition & 3 deletions spec/spec_helper.rb
Expand Up @@ -58,9 +58,7 @@
config.filter_run_excluding broken_on: :ruby_head
end

if %w[jruby-9.3-ascii_spec jruby-9.3-spec].include? ENV.fetch('CIRCLE_JOB', nil)
config.filter_run_excluding broken_on: :jruby
end
config.filter_run_excluding broken_on: :jruby if ENV.fetch('GITHUB_JOB', nil) == 'jruby'
end

module ::RSpec
Expand Down

0 comments on commit db4fa07

Please sign in to comment.