update tests #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: [$default-branch] | |
pull_request: | |
jobs: | |
test: | |
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'] | |
gemfile: ['Gemfile', 'Gemfile.redis3', 'Gemfile.redis4'] | |
env: | |
# $BUNDLE_GEMFILE must be set at the job level, so it is set for all steps | |
BUNDLE_GEMFILE: ${{ github.workspace }}/${{ matrix.gemfile }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby ${{ matrix.ruby-version }} | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Run tests | |
env: | |
# The hostname used to communicate with the Redis service container | |
REDIS_TEST_HOST: localhost | |
# The default Redis port | |
REDIS_TEST_PORT: 6379 | |
run: bundle exec rake |