Skip to content

JRuby Continuous Integration #307

JRuby Continuous Integration

JRuby Continuous Integration #307

Workflow file for this run

name: JRuby Continuous Integration
on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:
jobs:
unit_tests:
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- "3306:3306"
strategy:
fail-fast: false
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag v3.5.0
- name: Install JRuby
uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484 # tag v1.151.0
with:
ruby-version: jruby-9.4.3.0
- name: Bundle
run: bundle install
- name: Run Unit Tests
uses: nick-fields/retry@943e742917ac94714d2f408a0e8320f2d1fcafcd # tag v2.8.3
with:
timeout_minutes: 30
max_attempts: 2
command: bundle exec rake test:env[norails,rails61,rails60]
env:
VERBOSE_TEST_OUTPUT: true
DB_PORT: ${{ job.services.mysql.ports[3306] }}
JRUBY_OPTS: --dev --debug
jruby_multiverse:
runs-on: ubuntu-22.04
services:
elasticsearch7:
image: elasticsearch:7.16.2
env:
discovery.type: single-node
ports:
- 9200:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
elasticsearch8:
image: elasticsearch:8.4.2
env:
discovery.type: single-node
xpack.security.enabled: false
ports:
- 9250:9200
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
memcached:
image: memcached:latest
ports:
- 11211:11211
options: >-
--health-cmd "timeout 5 bash -c 'cat < /dev/null > /dev/udp/127.0.0.1/11211'"
--health-interval 10s
--health-timeout 5s
--health-retries 5
mongodb:
image: mongo:5.0.11
ports:
- 27017:27017
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
ports:
- "3306:3306"
postgres:
image: postgres:latest
ports:
- 5432:5432
rabbitmq:
image: rabbitmq:latest
ports:
- 5672:5672
options: >-
--health-cmd "rabbitmq-diagnostics -q check_port_connectivity"
--health-interval 10s
--health-timeout 5s
--health-retries 5
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:
multiverse: [agent, background, background_2, database, frameworks, httpclients, httpclients_2, rails, rest]
steps:
- name: Configure git
run: 'git config --global init.defaultBranch main'
- name: Check out the source code
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # tag v3.5.0
- name: Install JRuby
uses: ruby/setup-ruby@bc1dd263b68cb5626dbb55d5c89777d79372c484 # tag v1.151.0
with:
ruby-version: jruby-9.4.3.0
- name: Bundle
run: bundle install
- name: Run Multiverse Tests
run: ./.github/workflows/scripts/retry_command
env:
TEST_CMD: "bundle exec rake test:multiverse[group=${{ matrix.multiverse }}]"
VERBOSE_TEST_OUTPUT: true
RETRY_ATTEMPTS: 5
SERIALIZE: 1
DB_PORT: ${{ job.services.mysql.ports[3306] }}
JRUBY_OPTS: --dev --debug
- name: Annotate errors
if: ${{ failure() }}
uses: ./.github/actions/annotate