Skip to content

Commit 5bed419

Browse files
authored
ci: Move redis to service (#2921)
1 parent 0dd3f05 commit 5bed419

File tree

3 files changed

+30
-15
lines changed

3 files changed

+30
-15
lines changed

.github/workflows/sentry_resque_test.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ jobs:
2424
name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }}
2525
runs-on: ubuntu-latest
2626
timeout-minutes: 10
27+
services:
28+
redis:
29+
image: redis:5
30+
ports:
31+
- 6379:6379
32+
options: >-
33+
--health-cmd "redis-cli ping"
34+
--health-interval 10s
35+
--health-timeout 5s
36+
--health-retries 5
2737
env:
2838
RUBYOPT: ${{ matrix.options.rubyopt }}
2939
BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-resque/Gemfile
@@ -48,11 +58,6 @@ jobs:
4858
ruby-version: ${{ matrix.ruby_version }}
4959
bundler-cache: true
5060

51-
- name: Start Redis
52-
uses: supercharge/redis-github-action@105b02b0ae87d7c6a8bb8debaf94b553a593327b # 1.8.1
53-
with:
54-
redis-version: 5
55-
5661
- name: Run specs without Rails
5762
env:
5863
RUBYOPT: ${{ matrix.options.rubyopt }}

.github/workflows/sentry_ruby_test.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ jobs:
2020
name: Ruby ${{ matrix.ruby_version }} & Rack ${{ matrix.rack_version }}, options - ${{ toJson(matrix.options) }}
2121
runs-on: ubuntu-latest
2222
timeout-minutes: 10
23+
services:
24+
redis:
25+
image: redis:6
26+
ports:
27+
- 6379:6379
28+
options: >-
29+
--health-cmd "redis-cli ping"
30+
--health-interval 10s
31+
--health-timeout 5s
32+
--health-retries 5
2333
env:
2434
RUBYOPT: ${{ matrix.options.rubyopt }}
2535
BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-ruby/Gemfile
@@ -65,11 +75,6 @@ jobs:
6575
ruby-version: ${{ matrix.ruby_version }}
6676
bundler-cache: true
6777

68-
- name: Start Redis
69-
uses: supercharge/redis-github-action@105b02b0ae87d7c6a8bb8debaf94b553a593327b # 1.8.1
70-
with:
71-
redis-version: 6
72-
7378
- name: Run specs with Rack ${{ matrix.rack_version }} and redis-rb ${{ matrix.redis_rb_version }}
7479
run: bundle exec rake
7580

.github/workflows/sentry_sidekiq_test.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ jobs:
2424
name: Ruby ${{ matrix.ruby_version }} & Sidekiq ${{ matrix.sidekiq_version }}, options - ${{ toJson(matrix.options) }}
2525
runs-on: ubuntu-latest
2626
timeout-minutes: 10
27+
services:
28+
redis:
29+
image: redis:${{ (contains(matrix.sidekiq_version, '7.0') || contains(matrix.sidekiq_version, '8.0')) && '6' || '5' }}
30+
ports:
31+
- 6379:6379
32+
options: >-
33+
--health-cmd "redis-cli ping"
34+
--health-interval 10s
35+
--health-timeout 5s
36+
--health-retries 5
2737
env:
2838
RUBYOPT: ${{ matrix.options.rubyopt }}
2939
BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-sidekiq/Gemfile
@@ -65,11 +75,6 @@ jobs:
6575
ruby-version: ${{ matrix.ruby_version }}
6676
bundler-cache: true
6777

68-
- name: Start Redis
69-
uses: supercharge/redis-github-action@105b02b0ae87d7c6a8bb8debaf94b553a593327b # 1.8.1
70-
with:
71-
redis-version: ${{ (contains(matrix.sidekiq_version, '7.0') || contains(matrix.sidekiq_version, '8.0')) && 6 || 5 }}
72-
7378
- name: Run specs with Sidekiq ${{ matrix.sidekiq_version }}
7479
run: bundle exec rake
7580

0 commit comments

Comments
 (0)