Skip to content

Commit 80aedec

Browse files
authored
Test sentry rails integration separately (#1321)
* Test sentry-rails integraion in a separate process Most of the sentry-sidekiq tests should be run without sentry-rails and rails. And since there's no easy way to unload those gems in a RSpec process, we should use 2 processes to test them separately. * Use make test for running sentry-sidekiq's specs on CI
1 parent d96032a commit 80aedec

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

.github/workflows/sentry_sidekiq_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,4 @@ jobs:
4040
- name: Run specs
4141
run: |
4242
bundle install --jobs 4 --retry 3
43-
bundle exec rake
43+
make test

sentry-sidekiq/Makefile

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

sentry-sidekiq/spec/sentry/rails_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
return unless ENV["WITH_SENTRY_RAILS"]
2+
13
require "rails"
24
require "sentry-rails"
35
require "spec_helper"

0 commit comments

Comments
 (0)