diff --git a/.github/workflows/sentry_delayed_job_test.yml b/.github/workflows/sentry_delayed_job_test.yml index 206c6eeb7..d40cdfaa1 100644 --- a/.github/workflows/sentry_delayed_job_test.yml +++ b/.github/workflows/sentry_delayed_job_test.yml @@ -25,7 +25,12 @@ jobs: working-directory: sentry-delayed_job name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }} runs-on: ubuntu-latest + env: + RUBYOPT: ${{ matrix.options.rubyopt }} + BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-delayed_job/Gemfile + BUNDLE_WITHOUT: rubocop strategy: + fail-fast: false matrix: ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} include: @@ -55,13 +60,10 @@ jobs: uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby_version }} + bundler-cache: true - name: Run specs - env: - RUBYOPT: ${{ matrix.options.rubyopt }} - run: | - bundle install --jobs 4 --retry 3 - bundle exec rake + run: bundle exec rake - name: Upload Coverage if: ${{ matrix.options.codecov }} diff --git a/.github/workflows/sentry_opentelemetry_test.yml b/.github/workflows/sentry_opentelemetry_test.yml index 1aba897ba..ddf480f2d 100644 --- a/.github/workflows/sentry_opentelemetry_test.yml +++ b/.github/workflows/sentry_opentelemetry_test.yml @@ -25,7 +25,13 @@ jobs: working-directory: sentry-opentelemetry name: Ruby ${{ matrix.ruby_version }} & OpenTelemetry ${{ matrix.opentelemetry_version }}, options - ${{ toJson(matrix.options) }} runs-on: ubuntu-latest + env: + RUBYOPT: ${{ matrix.options.rubyopt }} + BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-opentelemetry/Gemfile + BUNDLE_WITHOUT: rubocop + OPENTELEMETRY_VERSION: ${{ matrix.opentelemetry_version }} strategy: + fail-fast: false matrix: ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} # opentelemetry_version: [1.2.0] @@ -48,12 +54,7 @@ jobs: bundler-cache: true - name: Run specs - env: - RUBYOPT: ${{ matrix.options.rubyopt }} - OPENTELEMETRY_VERSION: ${{ matrix.opentelemetry_version }} - run: | - bundle install --jobs 4 --retry 3 - bundle exec rake + run: bundle exec rake - name: Upload Coverage if: ${{ matrix.options.codecov }} diff --git a/.github/workflows/sentry_rails_test.yml b/.github/workflows/sentry_rails_test.yml index 9e1e55d8a..a38c7c398 100644 --- a/.github/workflows/sentry_rails_test.yml +++ b/.github/workflows/sentry_rails_test.yml @@ -19,6 +19,11 @@ jobs: working-directory: sentry-rails name: Ruby ${{ matrix.ruby_version }} & Rails ${{ matrix.rails_version }}, options - ${{ toJson(matrix.options) }} runs-on: ubuntu-latest + env: + RUBYOPT: ${{ matrix.options.rubyopt }} + BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-rails/Gemfile + BUNDLE_WITHOUT: rubocop + RAILS_VERSION: ${{ matrix.rails_version }} strategy: fail-fast: false matrix: @@ -75,12 +80,7 @@ jobs: bundler-cache: true - name: Build with Rails ${{ matrix.rails_version }} - env: - RAILS_VERSION: ${{ matrix.rails_version }} - RUBYOPT: ${{ matrix.options.rubyopt }} - run: | - bundle install --jobs 4 --retry 3 - bundle exec rake + run: bundle exec rake - name: Upload Coverage if: ${{ matrix.options.codecov }} diff --git a/.github/workflows/sentry_resque_test.yml b/.github/workflows/sentry_resque_test.yml index bdd71e6ce..548410413 100644 --- a/.github/workflows/sentry_resque_test.yml +++ b/.github/workflows/sentry_resque_test.yml @@ -25,7 +25,12 @@ jobs: working-directory: sentry-resque name: Ruby ${{ matrix.ruby_version }}, options - ${{ toJson(matrix.options) }} runs-on: ubuntu-latest + env: + RUBYOPT: ${{ matrix.options.rubyopt }} + BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-resque/Gemfile + BUNDLE_WITHOUT: rubocop strategy: + fail-fast: false matrix: ruby_version: ${{ fromJson(needs.ruby-versions.outputs.versions) }} include: @@ -50,20 +55,15 @@ jobs: with: redis-version: 5 - - name: Run specs + - name: Run specs without Rails env: RUBYOPT: ${{ matrix.options.rubyopt }} - run: | - bundle install --jobs 4 --retry 3 - bundle exec rake + run: BUNDLE_WITHOUT="rubocop rails" bundle exec rake - name: Run specs with Rails env: - BUNDLE_GEMFILE: Gemfile_with_rails.rb RUBYOPT: ${{ matrix.options.rubyopt }} - run: | - bundle install --jobs 4 --retry 3 - bundle exec rake + run: bundle exec rake - name: Upload Coverage if: ${{ matrix.options.codecov }} diff --git a/.github/workflows/sentry_ruby_test.yml b/.github/workflows/sentry_ruby_test.yml index bc6a1ad64..51fa25493 100644 --- a/.github/workflows/sentry_ruby_test.yml +++ b/.github/workflows/sentry_ruby_test.yml @@ -26,6 +26,12 @@ jobs: name: Ruby ${{ matrix.ruby_version }} & Rack ${{ matrix.rack_version }}, options - ${{ toJson(matrix.options) }} runs-on: ubuntu-latest timeout-minutes: 10 + env: + RUBYOPT: ${{ matrix.options.rubyopt }} + BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-ruby/Gemfile + BUNDLE_WITHOUT: rubocop + RACK_VERSION: ${{ matrix.rack_version }} + REDIS_RB_VERSION: ${{ matrix.redis_rb_version }} strategy: fail-fast: false matrix: @@ -69,14 +75,7 @@ jobs: redis-version: 6 - name: Run specs with Rack ${{ matrix.rack_version }} and redis-rb ${{ matrix.redis_rb_version }} - env: - RUBYOPT: ${{ matrix.options.rubyopt }} - RACK_VERSION: ${{ matrix.rack_version }} - REDIS_RB_VERSION: ${{ matrix.redis_rb_version }} - run: | - bundle config set without 'rubocop' - bundle install --jobs 4 --retry 3 - bundle exec rake + run: bundle exec rake - name: Upload Coverage if: ${{ matrix.options.codecov }} diff --git a/.github/workflows/sentry_sidekiq_test.yml b/.github/workflows/sentry_sidekiq_test.yml index 06bb45a9d..d472492f0 100644 --- a/.github/workflows/sentry_sidekiq_test.yml +++ b/.github/workflows/sentry_sidekiq_test.yml @@ -19,7 +19,13 @@ jobs: working-directory: sentry-sidekiq name: Ruby ${{ matrix.ruby_version }} & Sidekiq ${{ matrix.sidekiq_version }}, options - ${{ toJson(matrix.options) }} runs-on: ubuntu-latest + env: + RUBYOPT: ${{ matrix.options.rubyopt }} + BUNDLE_GEMFILE: ${{ github.workspace }}/sentry-sidekiq/Gemfile + BUNDLE_WITHOUT: rubocop + SIDEKIQ_VERSION: ${{ matrix.sidekiq_version }} strategy: + fail-fast: false matrix: sidekiq_version: ["5.0", "6.5", "7.0"] ruby_version: ["2.7", "3.0", "3.1", "3.2", "3.3", jruby] @@ -61,11 +67,8 @@ jobs: - name: Run specs with Sidekiq ${{ matrix.sidekiq_version }} env: - SIDEKIQ_VERSION: ${{ matrix.sidekiq_version }} - RUBYOPT: ${{ matrix.options.rubyopt }} - run: | - bundle install --jobs 4 --retry 3 - make test + WITH_SENTRY_RAILS: 1 + run: bundle exec rake - name: Upload Coverage if: ${{ matrix.options.codecov }} diff --git a/sentry-resque/Gemfile b/sentry-resque/Gemfile index 96f47a3a5..5819261e7 100644 --- a/sentry-resque/Gemfile +++ b/sentry-resque/Gemfile @@ -10,3 +10,8 @@ gem "sentry-ruby", path: "../sentry-ruby" gem "resque-retry", "~> 1.8" eval_gemfile File.expand_path("../Gemfile", __dir__) + +group :rails do + gem "sentry-rails", path: "../sentry-rails" + gem "rails" +end diff --git a/sentry-resque/Gemfile_with_rails.rb b/sentry-resque/Gemfile_with_rails.rb deleted file mode 100644 index 306b36624..000000000 --- a/sentry-resque/Gemfile_with_rails.rb +++ /dev/null @@ -1,6 +0,0 @@ -# frozen_string_literal: true - -eval_gemfile File.expand_path("Gemfile", __dir__) - -gem "sentry-rails", path: "../sentry-rails" -gem "rails" diff --git a/sentry-sidekiq/Makefile b/sentry-sidekiq/Makefile index 63010b098..62ad039eb 100644 --- a/sentry-sidekiq/Makefile +++ b/sentry-sidekiq/Makefile @@ -1,7 +1,3 @@ build: bundle install gem build sentry-sidekiq.gemspec - -test: - WITH_SENTRY_RAILS=1 bundle exec rspec spec/sentry/rails_spec.rb - bundle exec rspec