-
Notifications
You must be signed in to change notification settings - Fork 646
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
Improve running tests locally #1093
base: master
Are you sure you want to change the base?
Conversation
ab78f3f
to
d4258d5
Compare
Rakefile
Outdated
@@ -23,6 +23,13 @@ end | |||
|
|||
desc 'Setup and run all tests' | |||
task :setup_and_run_tests do | |||
ENV['BUNDLE_GEMFILE'] = File.join(__dir__, 'gemfiles', "#{ENV['RAILS_VERSION']}.gemfile") if ENV['RAILS_VERSION'] |
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.
maybe it could default to the latest available rails Gemfile and display that it has done that automatically instead of exiting and forcing the user to set an ENV var ?
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.
@mathieujobin I've switched the Rakefile and GH actions to use RAILS_VERSION
directly as otherwise BUNDLE_GEMFILE
was defaulting to wicked_pdf/Gemfile
which never actually works
end | ||
|
||
ENV['BUNDLE_GEMFILE'] = File.join(__dir__, 'gemfiles', "#{rails_version}.gemfile") |
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.
interesting
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.
I have switch multiple projects to remove all of the individual gemfiles and use ENV var inside the main gemfiles instead... for some reason, it fails for this project. but I have this WIP branch if you want to take a look
Hi there! Why not using https://github.com/thoughtbot/appraisal ? It's the main purpose of this gem 😉 |
This PR improves local developer experience by pointing out what needs to be done for the tests to work locally without relying on CI