-
Notifications
You must be signed in to change notification settings - Fork 45
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 dartsass:install
command
#49
Conversation
I am seeing test failures when running the GitHub CI workflow in my own fork, but only with Ruby 3.0 and Rails >= 7.1. I'm not sure what is happening, but it's something related to Bundler (the |
b423960
to
22bc2f7
Compare
# This prevents a "Failed to build gem native extension" error when | ||
# running `bundle install` inside a Rails app that is generated for | ||
# testing. The error occurs only in CI, and only when using Ruby 3.0 and | ||
# Rails >= 7.1. | ||
- name: Install sass-embedded gem | ||
if: ${{ matrix.ruby-version == '3.0' }} | ||
run: gem install sass-embedded |
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.
The underlying cause is unclear, but this is the resolution to my previous comment.
This adds testing infrastructure to test against multiple versions of Rails, including Rails `main` branch.
22bc2f7
to
b7c781b
Compare
This adds test coverage for the `dartsass:install` command. The command is 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.
b7c781b
to
9c92c6f
Compare
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 is magnificent!
@jonathanhefner did you get all the variations to pass? |
@dhh Yes: https://github.com/jonathanhefner/dartsass-rails/actions/runs/7089553301. I did not merge because I do not have commit permissions for this repo. 😄 |
This PR looks large because this project currently has no testing infrastructure. The vast majority of LOC in this PR are from
Gemfile
andGemfile.lock
files. I have split the PR into two commits to further clarify. The latter commit has the actual testing code, which amounts to ~70 lines of test code + ~70 lines of helper code.This adds test coverage for the
dartsass:install
command. The command is 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 6.1, 7.0, 7.1, and
main
branch, all with both Sprockets and Propshaft.