From f7c661a781f516a89986f0e1ed225733282f8caa Mon Sep 17 00:00:00 2001 From: Neel Shah Date: Fri, 27 Mar 2026 17:29:27 +0100 Subject: [PATCH] ci: Move redis to service --- .github/workflows/sentry_resque_test.yml | 15 ++++++++++----- .github/workflows/sentry_ruby_test.yml | 15 ++++++++++----- .github/workflows/sentry_sidekiq_test.yml | 15 ++++++++++----- 3 files changed, 30 insertions(+), 15 deletions(-) diff --git a/.github/workflows/sentry_resque_test.yml b/.github/workflows/sentry_resque_test.yml index becc921b1..9b87eb67d 100644 --- a/.github/workflows/sentry_resque_test.yml +++ b/.github/workflows/sentry_resque_test.yml @@ -24,6 +24,16 @@ jobs: name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }} runs-on: ubuntu-latest timeout-minutes: 10 + services: + redis: + image: redis:5 + ports: + - 6379:6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 env: RUBYOPT: ${{ matrix.options.rubyopt }} BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-resque/Gemfile @@ -48,11 +58,6 @@ jobs: ruby-version: ${{ matrix.ruby_version }} bundler-cache: true - - name: Start Redis - uses: supercharge/redis-github-action@105b02b0ae87d7c6a8bb8debaf94b553a593327b # 1.8.1 - with: - redis-version: 5 - - name: Run specs without Rails env: RUBYOPT: ${{ matrix.options.rubyopt }} diff --git a/.github/workflows/sentry_ruby_test.yml b/.github/workflows/sentry_ruby_test.yml index 839b70d15..33cc04487 100644 --- a/.github/workflows/sentry_ruby_test.yml +++ b/.github/workflows/sentry_ruby_test.yml @@ -20,6 +20,16 @@ jobs: name: Ruby ${{ matrix.ruby_version }} & Rack ${{ matrix.rack_version }}, options - ${{ toJson(matrix.options) }} runs-on: ubuntu-latest timeout-minutes: 10 + services: + redis: + image: redis:6 + ports: + - 6379:6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 env: RUBYOPT: ${{ matrix.options.rubyopt }} BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-ruby/Gemfile @@ -65,11 +75,6 @@ jobs: ruby-version: ${{ matrix.ruby_version }} bundler-cache: true - - name: Start Redis - uses: supercharge/redis-github-action@105b02b0ae87d7c6a8bb8debaf94b553a593327b # 1.8.1 - with: - redis-version: 6 - - name: Run specs with Rack ${{ matrix.rack_version }} and redis-rb ${{ matrix.redis_rb_version }} run: bundle exec rake diff --git a/.github/workflows/sentry_sidekiq_test.yml b/.github/workflows/sentry_sidekiq_test.yml index 59157a52b..0f3244128 100644 --- a/.github/workflows/sentry_sidekiq_test.yml +++ b/.github/workflows/sentry_sidekiq_test.yml @@ -24,6 +24,16 @@ jobs: name: Ruby ${{ matrix.ruby_version }} & Sidekiq ${{ matrix.sidekiq_version }}, options - ${{ toJson(matrix.options) }} runs-on: ubuntu-latest timeout-minutes: 10 + services: + redis: + image: redis:${{ (contains(matrix.sidekiq_version, '7.0') || contains(matrix.sidekiq_version, '8.0')) && '6' || '5' }} + ports: + - 6379:6379 + options: >- + --health-cmd "redis-cli ping" + --health-interval 10s + --health-timeout 5s + --health-retries 5 env: RUBYOPT: ${{ matrix.options.rubyopt }} BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-sidekiq/Gemfile @@ -65,11 +75,6 @@ jobs: ruby-version: ${{ matrix.ruby_version }} bundler-cache: true - - name: Start Redis - uses: supercharge/redis-github-action@105b02b0ae87d7c6a8bb8debaf94b553a593327b # 1.8.1 - with: - redis-version: ${{ (contains(matrix.sidekiq_version, '7.0') || contains(matrix.sidekiq_version, '8.0')) && 6 || 5 }} - - name: Run specs with Sidekiq ${{ matrix.sidekiq_version }} run: bundle exec rake