Skip to content

JRuby Continuous Integration #1259

JRuby Continuous Integration

JRuby Continuous Integration #1259

Workflow file for this run

name: JRuby Continuous Integration
on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:
jobs:
jruby_unit_tests:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2
- name: Install JRuby
uses: ruby/setup-ruby@8d27f39a5e7ad39aebbcbd1324f7af020229645c # tag v1.287.0
with:
ruby-version: jruby-9.4.14.0
- name: Bundle
run: bundle install
- name: Run Unit Tests
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # tag v3.0.2
with:
timeout_minutes: 30
max_attempts: 2
command: bundle exec rake test:env[norails,rails61]
env:
VERBOSE_TEST_OUTPUT: true
JAVA_OPTS: --add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist
JRUBY_OPTS: --dev
jruby_multiverse:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
suite: [active_support_broadcast_logger, active_support_logger, activemerchant, agent_only, async_http, bare, deferred_instrumentation, grape, high_security, httpclient, httprb, httpx, hybrid_agent, json, logger, marshalling, rack, resque, roda, roda_agent_disabled, ruby_openai, sequel, sinatra, sinatra_agent_disabled, stripe, thread, tilt, typhoeus]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- name: Check out the source code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2
- name: Install JRuby
uses: ruby/setup-ruby@8d27f39a5e7ad39aebbcbd1324f7af020229645c # tag v1.287.0
with:
ruby-version: jruby-9.4.14.0
- name: Bundle
run: bundle install
- name: Run Multiverse Tests
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # tag v3.0.2
with:
timeout_minutes: 20
max_attempts: 3
command: "bundle exec rake test:multiverse[${{ matrix.suite }}]"
env:
VERBOSE_TEST_OUTPUT: true
SERIALIZE: 1
JAVA_OPTS: --add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist -Xmx4g -Xms512m
JRUBY_OPTS: --dev
- name: Annotate errors
if: ${{ failure() }}
uses: ./.github/actions/annotate
jruby_sidekiq:
runs-on: ubuntu-22.04
services:
redis:
image: redis
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
fail-fast: false
matrix:
suite: [sidekiq]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- name: Check out the source code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2
- name: Install JRuby
uses: ruby/setup-ruby@8d27f39a5e7ad39aebbcbd1324f7af020229645c # tag v1.287.0
with:
ruby-version: jruby-9.4.14.0
- name: Bundle
run: bundle install
- name: Run Multiverse Tests
uses: nick-fields/retry@ce71cc2ab81d554ebbe88c79ab5975992d79ba08 # tag v3.0.2
with:
timeout_minutes: 20
max_attempts: 3
command: "bundle exec rake test:multiverse[${{ matrix.suite }}]"
env:
VERBOSE_TEST_OUTPUT: true
SERIALIZE: 1
JAVA_OPTS: --add-opens java.base/sun.nio.ch=org.jruby.dist --add-opens java.base/java.io=org.jruby.dist -Xmx4g -Xms512m
JRUBY_OPTS: --dev
- name: Annotate errors
if: ${{ failure() }}
uses: ./.github/actions/annotate
notify_slack_fail:
name: Notify slack fail
needs: [jruby_unit_tests, jruby_multiverse, jruby_sidekiq]
runs-on: ubuntu-22.04
if: always()
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2
- uses: ./.github/actions/workflow-conclusion
- uses: voxmedia/github-action-slack-notify-build@373da97827332b19e753c84d1e5b7937dbe0fbfa # tag v2
if: ${{ env.WORKFLOW_CONCLUSION == 'failure' && github.event_name != 'workflow_dispatch' }}
env:
SLACK_BOT_TOKEN: ${{ secrets.RUBY_GITHUB_ACTIONS_BOT_WEBHOOK }}
with:
channel: ruby-agent-notifications
status: FAILED
color: danger
notify_slack_success:
name: Notify slack success
needs: [jruby_unit_tests, jruby_multiverse, jruby_sidekiq]
runs-on: ubuntu-22.04
if: always()
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # tag v6.0.2
- uses: ./.github/actions/workflow-conclusion
- run: echo ${{ github.event_name }}
- uses: Mercymeilya/last-workflow-status@3418710aefe8556d73b6f173a0564d38bcfd9a43 # tag v0.3.3
id: last_status
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- uses: voxmedia/github-action-slack-notify-build@373da97827332b19e753c84d1e5b7937dbe0fbfa # tag v2
if: ${{ env.WORKFLOW_CONCLUSION == 'success' && steps.last_status.outputs.last_status == 'failure' && github.event_name != 'workflow_dispatch' }}
env:
SLACK_BOT_TOKEN: ${{ secrets.RUBY_GITHUB_ACTIONS_BOT_WEBHOOK }}
with:
channel: ruby-agent-notifications
status: SUCCESS
color: good