Add RSpec GitHub annotations gem (#24040)

This commit is contained in:
Nick Schonning 2023-10-17 12:28:09 -04:00 committed by GitHub
parent 71447ab19f
commit 5ef26d8fd5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 0 deletions

View file

@ -106,6 +106,9 @@ group :test do
# Used to split testing into chunks in CI # Used to split testing into chunks in CI
gem 'rspec_chunked', '~> 0.6' gem 'rspec_chunked', '~> 0.6'
# Adds RSpec Error/Warning annotations to GitHub PRs on the Files tab
gem 'rspec-github', '~> 2.4', require: false
# RSpec progress bar formatter # RSpec progress bar formatter
gem 'fuubar', '~> 2.5' gem 'fuubar', '~> 2.5'

View file

@ -602,6 +602,8 @@ GEM
rspec-expectations (3.12.3) rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0) rspec-support (~> 3.12.0)
rspec-github (2.4.0)
rspec-core (~> 3.0)
rspec-mocks (3.12.5) rspec-mocks (3.12.5)
diff-lcs (>= 1.2.0, < 2.0) diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0) rspec-support (~> 3.12.0)
@ -885,6 +887,7 @@ DEPENDENCIES
redis (~> 4.5) redis (~> 4.5)
redis-namespace (~> 1.10) redis-namespace (~> 1.10)
rqrcode (~> 2.2) rqrcode (~> 2.2)
rspec-github (~> 2.4)
rspec-rails (~> 6.0) rspec-rails (~> 6.0)
rspec-sidekiq (~> 4.0) rspec-sidekiq (~> 4.0)
rspec_chunked (~> 0.6) rspec_chunked (~> 0.6)

View file

@ -36,6 +36,12 @@ RSpec.configure do |config|
config.after :suite do config.after :suite do
FileUtils.rm_rf(Dir[Rails.root.join('spec', 'test_files')]) FileUtils.rm_rf(Dir[Rails.root.join('spec', 'test_files')])
end end
# Use the GitHub Annotations formatter for CI
if ENV['GITHUB_ACTIONS'] == 'true'
require 'rspec/github'
config.add_formatter RSpec::Github::Formatter
end
end end
def body_as_json def body_as_json