You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: Add bin/test helper to invoke specs with mise (#2983)
* `./bin/test -l`: list all cells across gems
* `./bin/test --gem <gem>`: scope by gem, picks latest cell automatically if not supplied
* `./bin/test --cell <cell>`: run a cell's specs under its mise ruby
* `./bin/test --cell <cell> -- <spec args>`: forward args to rspec
* `./bin/test --cell <cell> --rake`: run `bundle exec rake` like CI
* extract shared cell/mise machinery into `bin/lib/matrix.rb` (used by relock and test)
* per gem `./bin/test` wrappers that pass through to top level command
* rename old rails `bin/test` -> `bin/test_old`
* part of: #2961
* part of: RUBY-180
Claude-Session: https://claude.ai/code/session_01Pmtt83HAJyyofGwhRGgcoj
Co-authored-by: Claude <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+22-8Lines changed: 22 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
1
# Agent Instructions
2
2
3
-
## Package Manager
4
-
Use **Bundler**. Each gem has its own `Gemfile`; run commands from within the gem subdirectory.
3
+
## Toolchain (mise)
4
+
[mise](https://mise.jdx.dev) manages Rubies and runs tasks. `.mise.toml` pins a single default Ruby for local work; `.mise.ci.toml` (loaded with `MISE_ENV=ci`) pins the full per-matrix Ruby set that CI, `bin/test`, and `bin/relock` resolve against.
5
+
5
6
```bash
6
-
cd sentry-ruby && bundle install
7
+
mise install # install the default toolchain (.mise.toml)
8
+
mise --env ci install # install the full CI matrix of Rubies (needed for bin/test)
7
9
```
8
10
9
11
## Monorepo Structure
@@ -19,18 +21,30 @@ cd sentry-ruby && bundle install
19
21
20
22
Shared test infrastructure lives in `lib/sentry/test/`. Root `Gemfile.dev` defines shared dev dependencies.
21
23
22
-
## File-Scoped Commands
24
+
## Testing
25
+
Use `bin/test` (from the repo root) to run a gem's specs under a single CI test-matrix cell — the local mirror of one CI job. The Ruby must already be installed (`mise --env ci install`).
26
+
You can also invoke `bin/test` from any of the gem directories themselves which automatically fills in the `--gem` part.
27
+
28
+
| Task | Command |
29
+
|------|---------|
30
+
| List every cell to choose from |`bin/test -l`|
31
+
| Run a gem (auto-picks newest installed Ruby cell) |`bin/test --gem sentry-rails`|
32
+
| Run a single spec |`bin/test --gem sentry-ruby spec/sentry/client_spec.rb`|
33
+
| Run a specific cell |`bin/test --cell sentry-ruby/gemfiles/ruby-3.3_rack-3_redis-4.gemfile`|
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -42,7 +42,7 @@ This file defines which specific image and Ruby version will be used to run the
42
42
bundle install
43
43
```
44
44
- Install any additional dependencies. `sentry-sidekiq` assumes you have `redis` running.
45
-
- Use `bundle exec rake` to run tests.
45
+
- Use the `./bin/test` helper to run tests.
46
46
- In `sentry-rails`, you can use `RAILS_VERSION=version` to specify the Rails version to test against. Default is `8.0`
47
47
- In `sentry-sidekiq`, you can use `SIDEKIQ_VERSION=version` to specify what version of Sidekiq to install when you run `bundle install`. Default is `7.0`
48
48
- Use example apps under the `example` or `examples` folder to test the change. (Remember to change the DSN first)
0 commit comments