name: Test on: push: branches: - master pull_request: branches: - master jobs: test: runs-on: ubuntu-latest strategy: fail-fast: false matrix: ruby-version: ["3.1", "3.0", "2.7"] # Service containers to run with `runner-job` 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 steps: - uses: actions/checkout@v3 - name: Set up Ruby ${{ matrix.ruby-version }} uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} bundler-cache: true - name: Install dependencies run: bundle install - name: Run tests run: bundle exec rspec --color