Skip to content
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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

d4rky-pl
Copy link
Contributor

@d4rky-pl d4rky-pl commented Jan 5, 2024

This PR improves local developer experience by pointing out what needs to be done for the tests to work locally without relying on CI

@d4rky-pl d4rky-pl force-pushed the improve-tests-running branch from ab78f3f to d4258d5 Compare January 5, 2024 11:23
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']
Copy link
Contributor

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 ?

Copy link
Contributor Author

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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting

Copy link
Contributor

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

master...mathieujobin:wicked_pdf:ruby33

@n-rodriguez
Copy link
Contributor

Hi there! Why not using https://github.com/thoughtbot/appraisal ? It's the main purpose of this gem 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants