Skip to content

Commit 5d0390d

Browse files
authored
Merge branch 'master' into ivoanjo/fix-flaky-profiler-spec
2 parents a3c8db5 + 3e73b3b commit 5d0390d

File tree

8 files changed

+123
-306
lines changed

8 files changed

+123
-306
lines changed

.circleci/config.yml

Lines changed: 79 additions & 295 deletions
Large diffs are not rendered by default.

.github/workflows/check.yml

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,27 @@
11
name: Check
22
on:
33
push:
4-
branches: [ '**' ]
5-
pull_request:
6-
# The branches below must be a subset of the branches above
7-
branches: [ '**' ]
4+
85
jobs:
6+
lint:
7+
runs-on: ubuntu-latest
8+
container:
9+
image: ghcr.io/datadog/images-rb/engines/ruby:3.2
10+
steps:
11+
- uses: actions/checkout@v4
12+
- name: Install dependencies
13+
run: bundle install
14+
- run: bundle exec rake rubocop standard
15+
916
check:
1017
name: Check types
11-
runs-on: ubuntu-22.04
18+
runs-on: ubuntu-latest
19+
container:
20+
image: ghcr.io/datadog/images-rb/engines/ruby:3.2
1221
steps:
1322
- uses: actions/checkout@v4
14-
- uses: ruby/setup-ruby@v1
15-
with:
16-
ruby-version: '3.2'
17-
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
23+
- name: Install dependencies
24+
run: bundle install
1825
- name: Check for stale signature files
1926
run: bundle exec rake rbs:stale
2027
- name: Check for missing signature files

Rakefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ namespace :test do
5959
command = if appraisal_group.empty?
6060
"bundle exec rake #{spec_task}"
6161
else
62-
"bundle exec appraisal #{ruby_runtime}-#{appraisal_group} rake #{spec_task}"
62+
gemfile = File.join(File.dirname(__FILE__), 'gemfiles', "#{ruby_runtime}-#{appraisal_group}.gemfile".tr('-', '_'))
63+
"env BUNDLE_GEMFILE=#{gemfile} bundle exec rake #{spec_task}"
6364
end
6465

6566
command += "'[#{spec_arguments}]'" if spec_arguments

appraisal/ruby-3.4.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@
125125
gem 'sneakers', '>= 2.12.0'
126126
gem 'sucker_punch'
127127
gem 'que', '>= 1.0.0'
128+
129+
# When Rack 3+ is used, we need rackup.
130+
gem 'rackup'
128131
end
129132

130133
[

docs/DevelopmentGuide.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,24 @@ TEST_METADATA = {
105105
}
106106
```
107107

108+
**Using appraisal**
109+
110+
`appraisal` command should only be used to update gemfiles in `gemfiles/`
111+
and install dependencies. It should not be used to run tests, since it does not
112+
work in all configurations. To run the tests, use:
113+
114+
```sh
115+
env BUNDLE_GEMFILE=gemfiles/#{ruby_runtime}_#{appraisal_group}.gemfile rake #{spec_task}
116+
```
117+
118+
Note that the file names use underscores while appraisal group and
119+
configuration definitions use dashes. The conversion could be performed as
120+
follows:
121+
122+
```sh
123+
env BUNDLE_GEMFILE=gemfiles/#{ruby_runtime.tr('-', '_')}_#{appraisal_group.tr('-', '_')}.gemfile rake #{spec_task}
124+
```
125+
108126
**Working with appraisal groups**
109127

110128
Checkout [Apppraisal](https://github.com/thoughtbot/appraisal) to learn the basics.

gemfiles/ruby_3.4_contrib.gemfile

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gemfiles/ruby_3.4_contrib.gemfile.lock

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

spec/datadog/tracing/contrib/suite/integration_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
require 'rack'
1010
# `Rack::Handler::WEBrick` was extracted to the `rackup` gem in Rack 3.0
11-
require 'rackup' if Rack::VERSION[0] >= 3
11+
require 'rackup' if Gem::Version.new(Rack::RELEASE) >= Gem::Version.new('3')
1212
require 'webrick'
1313

1414
RSpec.describe 'contrib integration testing', :integration do

0 commit comments

Comments
 (0)