Skip to content

Commit

Permalink
Minitest support (originally authored by @bravehager)
Browse files Browse the repository at this point in the history
  • Loading branch information
anmarchenko committed Aug 17, 2023
1 parent 3b2da63 commit e592b8c
Show file tree
Hide file tree
Showing 24 changed files with 1,294 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .standard_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
# Remove from this list as you refactor files.
---
ignore:
- lib/datadog/ci/contrib/minitest/integration.rb:
- Style/SafeNavigation
- lib/datadog/ci/contrib/cucumber/integration.rb:
- Style/SafeNavigation
- lib/datadog/ci/contrib/rspec/integration.rb:
Expand Down
12 changes: 12 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ def self.with_cucumber_gem(versions:)
end
end

def self.with_minitest_gem(versions: 5)
Array(versions).each do |v|
appraise "minitest-#{v}" do
gem "minitest", "~> #{v}"
end
end
end

# WIP: Support cucumber 8

# | Cucumber | Ruby required |
Expand Down Expand Up @@ -111,15 +119,19 @@ elsif ruby_version?("2.6")
with_rspec_gem
with_cucumber_gem(versions: 3..7)
elsif ruby_version?("2.7")
with_minitest_gem
with_rspec_gem
with_cucumber_gem(versions: 3..7)
elsif ruby_version?("3.0")
with_minitest_gem
with_rspec_gem
with_cucumber_gem(versions: 3..7)
elsif ruby_version?("3.1")
with_minitest_gem
with_rspec_gem
with_cucumber_gem(versions: 3..7)
elsif ruby_version?("3.2")
with_minitest_gem
with_rspec_gem
with_cucumber_gem(versions: 3..7)
end
Expand Down
6 changes: 5 additions & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ namespace :spec do
# Datadog CI integrations
[
:cucumber,
:rspec
:rspec,
:minitest
].each do |contrib|
RSpec::Core::RakeTask.new(contrib) do |t, args|
t.pattern = "spec/datadog/ci/contrib/#{contrib}/**/*_spec.rb"
Expand Down Expand Up @@ -94,4 +95,7 @@ task :ci do
declare "❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal cucumber-6 rake spec:cucumber"
declare "❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ✅ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal cucumber-7 rake spec:cucumber"
# declare "❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ❌ 2.5 / ✅ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal cucumber-8 rake spec:cucumber"

# Minitest
declare "❌ 2.1 / ❌ 2.2 / ❌ 2.3 / ❌ 2.4 / ❌ 2.5 / ❌ 2.6 / ✅ 2.7 / ✅ 3.0 / ✅ 3.1 / ✅ 3.2 / ✅ jruby" => "bundle exec appraisal minitest-5 rake spec:minitest"
end
22 changes: 22 additions & 0 deletions gemfiles/jruby_9.4.0.0_minitest_5.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "pry"
gem "rake"
gem "rspec"
gem "os"
gem "climate_control"
gem "rspec-collection_matchers"
gem "rspec_junit_formatter"
gem "appraisal"
gem "standard", "<= 1.24.3"
gem "yard"
gem "webrick"
gem "minitest", "~> 5"

group :check do

end

gemspec path: "../"
110 changes: 110 additions & 0 deletions gemfiles/jruby_9.4.0.0_minitest_5.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
PATH
remote: ..
specs:
datadog-ci (0.1.0)
ddtrace (~> 1)

GEM
remote: https://rubygems.org/
specs:
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
ast (2.4.2)
climate_control (1.2.0)
coderay (1.1.3)
ddtrace (1.13.1)
debase-ruby_core_source (= 3.2.1)
libdatadog (~> 3.0.0.1.0)
libddwaf (~> 1.9.0.0.0)
msgpack
debase-ruby_core_source (3.2.1)
diff-lcs (1.5.0)
ffi (1.15.5-java)
json (2.6.3-java)
language_server-protocol (3.17.0.3)
libdatadog (3.0.0.1.0)
libddwaf (1.9.0.0.1-java)
ffi (~> 1.0)
method_source (1.0.0)
minitest (5.19.0)
msgpack (1.7.2-java)
os (1.1.4)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
racc
pry (0.14.2-java)
coderay (~> 1.1)
method_source (~> 1.0)
spoon (~> 0.0)
racc (1.7.1-java)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-collection_matchers (1.2.0)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.44.1)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-performance (1.15.2)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.13.0)
spoon (0.0.6)
ffi
standard (1.24.3)
language_server-protocol (~> 3.17.0.2)
rubocop (= 1.44.1)
rubocop-performance (= 1.15.2)
thor (1.2.2)
unicode-display_width (2.4.2)
webrick (1.8.1)
yard (0.9.34)

PLATFORMS
universal-java-11

DEPENDENCIES
appraisal
climate_control
datadog-ci!
minitest (~> 5)
os
pry
rake
rspec
rspec-collection_matchers
rspec_junit_formatter
standard (<= 1.24.3)
webrick
yard

BUNDLED WITH
2.3.26
22 changes: 22 additions & 0 deletions gemfiles/ruby_2.7.6_minitest_5.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "pry"
gem "rake"
gem "rspec"
gem "os"
gem "climate_control"
gem "rspec-collection_matchers"
gem "rspec_junit_formatter"
gem "appraisal"
gem "standard", "<= 1.24.3"
gem "yard"
gem "webrick"
gem "minitest", "~> 5"

group :check do

end

gemspec path: "../"
107 changes: 107 additions & 0 deletions gemfiles/ruby_2.7.6_minitest_5.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
PATH
remote: ..
specs:
datadog-ci (0.1.0)
ddtrace (~> 1)

GEM
remote: https://rubygems.org/
specs:
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
ast (2.4.2)
climate_control (1.2.0)
coderay (1.1.3)
ddtrace (1.13.1)
debase-ruby_core_source (= 3.2.1)
libdatadog (~> 3.0.0.1.0)
libddwaf (~> 1.9.0.0.0)
msgpack
debase-ruby_core_source (3.2.1)
diff-lcs (1.5.0)
ffi (1.15.5)
json (2.6.3)
language_server-protocol (3.17.0.3)
libdatadog (3.0.0.1.0-aarch64-linux)
libddwaf (1.9.0.0.1-aarch64-linux)
ffi (~> 1.0)
method_source (1.0.0)
minitest (5.19.0)
msgpack (1.7.2)
os (1.1.4)
parallel (1.23.0)
parser (3.2.2.3)
ast (~> 2.4.1)
racc
pry (0.14.2)
coderay (~> 1.1)
method_source (~> 1.0)
racc (1.7.1)
rainbow (3.1.1)
rake (13.0.6)
regexp_parser (2.8.1)
rexml (3.2.6)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-collection_matchers (1.2.0)
rspec-expectations (>= 2.99.0.beta1)
rspec-core (3.12.2)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.6)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (1.44.1)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.24.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.29.0)
parser (>= 3.2.1.0)
rubocop-performance (1.15.2)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
ruby-progressbar (1.13.0)
standard (1.24.3)
language_server-protocol (~> 3.17.0.2)
rubocop (= 1.44.1)
rubocop-performance (= 1.15.2)
thor (1.2.2)
unicode-display_width (2.4.2)
webrick (1.8.1)
yard (0.9.34)

PLATFORMS
aarch64-linux

DEPENDENCIES
appraisal
climate_control
datadog-ci!
minitest (~> 5)
os
pry
rake
rspec
rspec-collection_matchers
rspec_junit_formatter
standard (<= 1.24.3)
webrick
yard

BUNDLED WITH
2.3.26
22 changes: 22 additions & 0 deletions gemfiles/ruby_3.0.4_minitest_5.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "pry"
gem "rake"
gem "rspec"
gem "os"
gem "climate_control"
gem "rspec-collection_matchers"
gem "rspec_junit_formatter"
gem "appraisal"
gem "standard", "<= 1.24.3"
gem "yard"
gem "webrick"
gem "minitest", "~> 5"

group :check do

end

gemspec path: "../"
Loading

0 comments on commit e592b8c

Please sign in to comment.