Skip to content

Commit

Permalink
Merge pull request #11 from DataDog/lloeki/add-devex
Browse files Browse the repository at this point in the history
Add DevEx tooling
  • Loading branch information
lloeki authored Nov 14, 2024
2 parents eaacdad + b094e32 commit 03f4506
Show file tree
Hide file tree
Showing 22 changed files with 201 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.yml]
indent_style = space
indent_size = 2

[*.md.erb]
insert_final_newline = false
trim_trailing_whitespace = false
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @DataDog/lang-platform-ruby
4 changes: 2 additions & 2 deletions .github/workflows/build-ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
docker run --platform linux/x86_64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} ruby -e 'puts RUBY_DESCRIPTION'
docker run --platform linux/x86_64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} gem --version
docker run --platform linux/x86_64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} bundle --version
docker run --platform linux/x86_64 --rm -v "${PWD}":"${PWD}" -w "${PWD}" ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} /bin/sh -c 'bundle install && bundle exec rake test'
docker run --platform linux/x86_64 --rm -v "${PWD}":"${PWD}" -w "${PWD}" -e BUNDLE_GEMFILE=gemfiles/${{ matrix.engine }}-${{ matrix.version }}.gemfile ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} /bin/sh -c 'bundle install && bundle exec rake test'
# Then, build image for aarch64 which, being emulated under qemu, is slower
#
Expand All @@ -108,7 +108,7 @@ jobs:
docker run --platform linux/aarch64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} ruby -e 'puts RUBY_DESCRIPTION'
docker run --platform linux/aarch64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} gem --version
docker run --platform linux/aarch64 --rm ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} bundle --version
docker run --platform linux/aarch64 --rm -v "${PWD}":"${PWD}" -w "${PWD}" ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} /bin/sh -c 'bundle install && bundle exec rake test'
docker run --platform linux/aarch64 --rm -v "${PWD}":"${PWD}" -w "${PWD}" -e BUNDLE_GEMFILE=gemfiles/${{ matrix.engine }}-${{ matrix.version }}.gemfile ${{ steps.vars.outputs.IMAGE }}:${{ steps.vars.outputs.TAG }} /bin/sh -c 'bundle install && bundle exec rake test'
# Finally, assemble multi-arch image for a combined push to the registry
#
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/.direnv
/vendor/bundle
/Gemfile.lock
/gemfiles/*.gemfile.lock
17 changes: 17 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
require:
- standard
- standard-custom
- standard-performance
- rubocop-performance
- rubocop-rake
- rubocop-minitest

inherit_gem:
standard: config/base.yml
standard-custom: config/base.yml
standard-performance: config/base.yml

AllCops:
TargetRubyVersion: 2.5
SuggestExtensions: false
NewCops: enable
3 changes: 3 additions & 0 deletions .standard.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# For available configuration options, see:
# https://github.com/standardrb/standard
ruby_version: 2.5
6 changes: 3 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
# frozen_string_literal: true

gem 'minitest'
gem 'rake'
gemfile = "#{RUBY_ENGINE}-#{RUBY_ENGINE_VERSION.split(".").take(2).join(".")}.gemfile"
eval_gemfile "gemfiles/#{gemfile}"
7 changes: 7 additions & 0 deletions gemfiles/jruby-9.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/jruby-9.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/jruby-9.4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.5.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.6.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
7 changes: 7 additions & 0 deletions gemfiles/ruby-2.7.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end
18 changes: 18 additions & 0 deletions gemfiles/ruby-3.0.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end
18 changes: 18 additions & 0 deletions gemfiles/ruby-3.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end
18 changes: 18 additions & 0 deletions gemfiles/ruby-3.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end
18 changes: 18 additions & 0 deletions gemfiles/ruby-3.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end
18 changes: 18 additions & 0 deletions gemfiles/ruby-3.4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
source "https://rubygems.org"

gem "rake"

group :test do
gem "minitest"
end

group :check do
gem "standard"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-minitest"
end

group :ide do
gem "ruby-lsp"
end

0 comments on commit 03f4506

Please sign in to comment.