-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
adds prompt for version script and a little more documentation #1729
Conversation
@@ -74,9 +74,11 @@ Run a single test | |||
`$ rake test TEST=path/to/test.rb TESTOPTS="--name=test_something"` | |||
|
|||
Run tests against different Rails versions by setting the RAILS_VERSION variable | |||
and bundling gems. | |||
and bundling gems. (save this script somewhere executable and run from top of AMS repository) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice. I just wrote this as something to paste into the console.
I think a better solution to recommend something more robust would be to recommend using wwtd and just use the current Ruby wwtd --local
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dont know much about WWTD .... I was originally gonna run it in the console, but found it simpler just to ../ams_tester.sh
and bail out when something crapped out 😩
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for example, this script is now out of date since we don't run on 4.0 anymore. wwtd just using the travis file as a source of truth. you could, of course do something like ruby -ryaml -e 'puts YAML.load_file("./.travis.yml")["env"]["matrix"].join(" ")'
instead to make the list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wwtd sounds like a great idea. Also, pulling the versions from .travis.yml would be very nice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(save this script somewhere executable and run from top of AMS repository)
can we make this even easier?
LGTM! |
|
||
```bash | ||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps #!/usr/bin/env bash
instead.
Some of my thoughts on this... My preference would be to report failures at the end by version as I like to fire off this script and work on something else until it's finished. Maybe wwtd could do this. The prompt requires someone to sit there and acknowledge the failures before moving on to the next version. I'm not sure I'd ever bail out at such a prompt since it's been helpful in the past to know in a single run of the script that something passes on some versions and not others. |
better version handling looks up via yml
#!/usr/bin/env bash | ||
|
||
rcommand='puts YAML.load_file("./.travis.yml")["env"]["matrix"].join(" ").gsub("RAILS_VERSION=", "")' | ||
versions=$(ruby -ryaml -e "$rcommand") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bf4 looking up versions based on your yml suggestion
Purpose
Wanted to pause version tester script on failures, and allow to halt execution.
Changes
adds a read/condition to failure case