Skip to content

scheduler+lock tests #4

scheduler+lock tests

scheduler+lock tests #4

on:
push:
branches: [$default-branch]
pull_request:
jobs:
test-scheduler-lock:
runs-on: ubuntu-latest
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps port 6379 on service container to the host
- "6379:6379"
strategy:
fail-fast: false
matrix:
ruby-version:
- "3.0"
- "3.1"
- "3.2"
- "3.3"
resque-version:
- "~> 1.23"
redis-version:
- "~> 3.3"
- "~> 4.8"
resque-scheduler-version:
- "4.3.0"
- "< 4.9.0"
- "~> 4.9"
- "https://github.com/Ibotta/resque-scheduler.git@enqueue-multi-rollback"
resque-lock-timeout-version:
- "latest"
- "https://github.com/Ibotta/[email protected]"
- "https://github.com/Ibotta/resque-lock-timeout.git@tests-with-scheduler"
exclude:
# resque-scheduler (= 4.3.0) depends on redis (~> 3.3)
- redis-version: "~> 4.8"
resque-scheduler-version: "4.3.0"
env:
REDIS_VERSION: "${{ matrix.redis-version }}"
RESQUE: "${{ matrix.resque-version }}"
RESQUE_SCHEDULER_VERSION: "${{ matrix.resque-scheduler-version }}"
RESQUE_LOCK_TIMEOUT_VERSION: "${{ matrix.resque-lock-timeout-version }}"
# The hostname used to communicate with the Redis service container
REDIS_TEST_HOST: localhost
# The default Redis port
REDIS_TEST_PORT: 6379
steps:
- uses: actions/checkout@v4
- name: Set up Ruby ${{ matrix.ruby-version }}
uses: ruby/setup-ruby@v1
with:
working-directory: scheduler-lock
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
working-directory: scheduler-lock
run: bundle exec rake