breamware/sidekiq-batch

View on GitHub
.github/workflows/ci.yml

Summary

Maintainability
Test Coverage
name: CI

on: [pull_request, workflow_dispatch]

jobs:
  test:
    env:
      REDIS_HOST: 'redis'

    runs-on: ubuntu-latest
    services:
      redis:
        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: ["3.0", "3.1", "3.2", ruby-head]

    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby
      uses: ruby/setup-ruby@v1
      with:
        bundler-cache: true # 'bundle install' and cache gems
        ruby-version: ${{ matrix.ruby }}
    - name: Run tests
      run: bundle exec rake