Skip to content

Commit d134d9e

Browse files
authored
Fix bundle cache on CI (#2432)
* Fix bundle cache on CI * [sidekiq] remove test run step from Makefile + restore bundle install * [resque] simplify running specs with/without Rails on CI
1 parent f3ed31e commit d134d9e

File tree

9 files changed

+48
-48
lines changed

9 files changed

+48
-48
lines changed

.github/workflows/sentry_delayed_job_test.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ jobs:
2525
working-directory: sentry-delayed_job
2626
name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }}
2727
runs-on: ubuntu-latest
28+
env:
29+
RUBYOPT: ${{ matrix.options.rubyopt }}
30+
BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-delayed_job/Gemfile
31+
BUNDLE_WITHOUT: rubocop
2832
strategy:
33+
fail-fast: false
2934
matrix:
3035
ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
3136
include:
@@ -55,13 +60,10 @@ jobs:
5560
uses: ruby/setup-ruby@v1
5661
with:
5762
ruby-version: ${{ matrix.ruby_version }}
63+
bundler-cache: true
5864

5965
- name: Run specs
60-
env:
61-
RUBYOPT: ${{ matrix.options.rubyopt }}
62-
run: |
63-
bundle install --jobs 4 --retry 3
64-
bundle exec rake
66+
run: bundle exec rake
6567

6668
- name: Upload Coverage
6769
if: ${{ matrix.options.codecov }}

.github/workflows/sentry_opentelemetry_test.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ jobs:
2525
working-directory: sentry-opentelemetry
2626
name: Ruby ${{ matrix.ruby_version }} & OpenTelemetry ${{ matrix.opentelemetry_version }}, options - ${{ toJson(matrix.options) }}
2727
runs-on: ubuntu-latest
28+
env:
29+
RUBYOPT: ${{ matrix.options.rubyopt }}
30+
BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-opentelemetry/Gemfile
31+
BUNDLE_WITHOUT: rubocop
32+
OPENTELEMETRY_VERSION: ${{ matrix.opentelemetry_version }}
2833
strategy:
34+
fail-fast: false
2935
matrix:
3036
ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
3137
# opentelemetry_version: [1.2.0]
@@ -48,12 +54,7 @@ jobs:
4854
bundler-cache: true
4955

5056
- name: Run specs
51-
env:
52-
RUBYOPT: ${{ matrix.options.rubyopt }}
53-
OPENTELEMETRY_VERSION: ${{ matrix.opentelemetry_version }}
54-
run: |
55-
bundle install --jobs 4 --retry 3
56-
bundle exec rake
57+
run: bundle exec rake
5758

5859
- name: Upload Coverage
5960
if: ${{ matrix.options.codecov }}

.github/workflows/sentry_rails_test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,11 @@ jobs:
1919
working-directory: sentry-rails
2020
name: Ruby ${{ matrix.ruby_version }} & Rails ${{ matrix.rails_version }}, options - ${{ toJson(matrix.options) }}
2121
runs-on: ubuntu-latest
22+
env:
23+
RUBYOPT: ${{ matrix.options.rubyopt }}
24+
BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-rails/Gemfile
25+
BUNDLE_WITHOUT: rubocop
26+
RAILS_VERSION: ${{ matrix.rails_version }}
2227
strategy:
2328
fail-fast: false
2429
matrix:
@@ -75,12 +80,7 @@ jobs:
7580
bundler-cache: true
7681

7782
- name: Build with Rails ${{ matrix.rails_version }}
78-
env:
79-
RAILS_VERSION: ${{ matrix.rails_version }}
80-
RUBYOPT: ${{ matrix.options.rubyopt }}
81-
run: |
82-
bundle install --jobs 4 --retry 3
83-
bundle exec rake
83+
run: bundle exec rake
8484

8585
- name: Upload Coverage
8686
if: ${{ matrix.options.codecov }}

.github/workflows/sentry_resque_test.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,12 @@ jobs:
2525
working-directory: sentry-resque
2626
name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }}
2727
runs-on: ubuntu-latest
28+
env:
29+
RUBYOPT: ${{ matrix.options.rubyopt }}
30+
BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-resque/Gemfile
31+
BUNDLE_WITHOUT: rubocop
2832
strategy:
33+
fail-fast: false
2934
matrix:
3035
ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
3136
include:
@@ -50,20 +55,15 @@ jobs:
5055
with:
5156
redis-version: 5
5257

53-
- name: Run specs
58+
- name: Run specs without Rails
5459
env:
5560
RUBYOPT: ${{ matrix.options.rubyopt }}
56-
run: |
57-
bundle install --jobs 4 --retry 3
58-
bundle exec rake
61+
run: BUNDLE_WITHOUT="rubocop rails" bundle exec rake
5962

6063
- name: Run specs with Rails
6164
env:
62-
BUNDLE_GEMFILE: Gemfile_with_rails.rb
6365
RUBYOPT: ${{ matrix.options.rubyopt }}
64-
run: |
65-
bundle install --jobs 4 --retry 3
66-
bundle exec rake
66+
run: bundle exec rake
6767

6868
- name: Upload Coverage
6969
if: ${{ matrix.options.codecov }}

.github/workflows/sentry_ruby_test.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@ jobs:
2626
name: Ruby ${{ matrix.ruby_version }} & Rack ${{ matrix.rack_version }}, options - ${{ toJson(matrix.options) }}
2727
runs-on: ubuntu-latest
2828
timeout-minutes: 10
29+
env:
30+
RUBYOPT: ${{ matrix.options.rubyopt }}
31+
BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-ruby/Gemfile
32+
BUNDLE_WITHOUT: rubocop
33+
RACK_VERSION: ${{ matrix.rack_version }}
34+
REDIS_RB_VERSION: ${{ matrix.redis_rb_version }}
2935
strategy:
3036
fail-fast: false
3137
matrix:
@@ -69,14 +75,7 @@ jobs:
6975
redis-version: 6
7076

7177
- name: Run specs with Rack ${{ matrix.rack_version }} and redis-rb ${{ matrix.redis_rb_version }}
72-
env:
73-
RUBYOPT: ${{ matrix.options.rubyopt }}
74-
RACK_VERSION: ${{ matrix.rack_version }}
75-
REDIS_RB_VERSION: ${{ matrix.redis_rb_version }}
76-
run: |
77-
bundle config set without 'rubocop'
78-
bundle install --jobs 4 --retry 3
79-
bundle exec rake
78+
run: bundle exec rake
8079

8180
- name: Upload Coverage
8281
if: ${{ matrix.options.codecov }}

.github/workflows/sentry_sidekiq_test.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,13 @@ jobs:
1919
working-directory: sentry-sidekiq
2020
name: Ruby ${{ matrix.ruby_version }} & Sidekiq ${{ matrix.sidekiq_version }}, options - ${{ toJson(matrix.options) }}
2121
runs-on: ubuntu-latest
22+
env:
23+
RUBYOPT: ${{ matrix.options.rubyopt }}
24+
BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-sidekiq/Gemfile
25+
BUNDLE_WITHOUT: rubocop
26+
SIDEKIQ_VERSION: ${{ matrix.sidekiq_version }}
2227
strategy:
28+
fail-fast: false
2329
matrix:
2430
sidekiq_version: ["5.0", "6.5", "7.0"]
2531
ruby_version: ["2.7", "3.0", "3.1", "3.2", "3.3", jruby]
@@ -61,11 +67,8 @@ jobs:
6167

6268
- name: Run specs with Sidekiq ${{ matrix.sidekiq_version }}
6369
env:
64-
SIDEKIQ_VERSION: ${{ matrix.sidekiq_version }}
65-
RUBYOPT: ${{ matrix.options.rubyopt }}
66-
run: |
67-
bundle install --jobs 4 --retry 3
68-
make test
70+
WITH_SENTRY_RAILS: 1
71+
run: bundle exec rake
6972

7073
- name: Upload Coverage
7174
if: ${{ matrix.options.codecov }}

sentry-resque/Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@ gem "sentry-ruby", path: "../sentry-ruby"
1010
gem "resque-retry", "~> 1.8"
1111

1212
eval_gemfile File.expand_path("../Gemfile", __dir__)
13+
14+
group :rails do
15+
gem "sentry-rails", path: "../sentry-rails"
16+
gem "rails"
17+
end

sentry-resque/Gemfile_with_rails.rb

Lines changed: 0 additions & 6 deletions
This file was deleted.

sentry-sidekiq/Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
build:
22
bundle install
33
gem build sentry-sidekiq.gemspec
4-
5-
test:
6-
WITH_SENTRY_RAILS=1 bundle exec rspec spec/sentry/rails_spec.rb
7-
bundle exec rspec

0 commit comments

Comments
 (0)