-
Notifications
You must be signed in to change notification settings - Fork 89
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
Test installer commands #149
base: main
Are you sure you want to change the base?
Conversation
This adds testing infrastructure to test against multiple versions of Rails, including Rails `main` branch.
This adds test coverage for the shared behavior of the installer commands. The commands are tested against a freshly generated Rails app using the version of Rails that is currently loaded. Thus the installers can be tested with different versions of Rails in CI.
This adds test coverage for specific behavior of the `css:install:bootstrap` command.
This adds test coverage for specific behavior of the `css:install:bulma` command.
This adds test coverage for specific behavior of the `css:install:postcss` command.
This adds test coverage for specific behavior of the `css:install:sass` command.
This adds test coverage for specific behavior of the `css:install:tailwind` command.
rails_version = ENV["RAILS_VERSION"] || "6.1.0" | ||
gem "rails", "~> #{rails_version}" | ||
|
||
gem "appraisal" | ||
gem "rails", "~> 6.0.0" | ||
gem "sprockets-rails" |
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.
This file defaulted the Rails version to 6.1, but the gemspec specifies 6.0. Which is correct? (Or do we want to jump to Rails 7.0?)
ruby-version: | ||
- "3.1" | ||
- "3.2" | ||
- "3.3" | ||
gemfile: | ||
- gemfiles/rails_7_0.gemfile | ||
- gemfiles/rails_7_1.gemfile | ||
- gemfiles/rails_main.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.
This only tests with Rails >= 7.0 and Ruby >= 3.1. I can add entries for Rails 6.0 and 6.1, and older versions of Ruby, but first I wanted to confirm which versions we want to support.
Let's just test against Rails 7+. |
This PR looks larger than it is because this project currently has no testing infrastructure. The majority of LOC in this PR are from
Gemfile
andGemfile.lock
files. I have split the PR into multiple commits to further clarify.This adds test coverage for the
css:install:bootstrap
,css:install:bulma
,css:install:postcss
,css:install:sass
, andcss:install:tailwind
commands. The commands are tested against a freshly generated Rails app using the version of Rails that is currently loaded. Thus the installer can be tested with different versions of Rails in CI.Infrastructure has been added to run tests against Rails 7.0, 7.1, and
main
branch.This PR takes a different approach than rails/dartsass-rails#49 — instead of separate appraisals / gemfiles for Sprockets and Propshaft, this PR has tests that target each.