-
Notifications
You must be signed in to change notification settings - Fork 256
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
Precompile assets in the host app before running specs #3362
base: main
Are you sure you want to change the base?
Conversation
f39e1cc
to
9a6d0a1
Compare
within_test_app do | ||
# Precompiles the javascript | ||
system "bin/rake spec:prepare" | ||
end |
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.
In my work in blacklight_range_limit, I solved this like this instead:
I think spec:prepare
ought to do it, rather than a custom blacklight:build_host_assets? I am wary of adding additional complexity here, without understanding why the existing logic wasn't working, and don't understand what this change is meant to accomplish -- in both cases "spec:prepare" is being run before the specs are run, what is expected to be the difference here?
I also wonder if we coudl replace that system shell-out with a simple rake dependency to existing spec:prepare
like demo'd in blacklight_range_limit -- I have become acutely aware of how long rake ci
takes to run, as I try to work with it in an iterative loop, and a shell out to bin/rspec
, with an additional app boot time added in, is definitely adding some time.
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.
Doesn't this have to happen within the test app? If you just call spec:prepare
won't that run at the engine root?
Isn't range limit also creating a custom task to do the same? https://github.com/projectblacklight/blacklight_range_limit/blob/da22926ef99ac2e1d3cb04a750a57ea0ed08b3a8/Rakefile#L37-L45
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.
Oh nevermind, you are absolutely right, I did similar to what you are doing here, yup.
Still not sure what this change would change, since within-test-app spec-prepare should have been called before tests were run already?
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.
Yes. This just moves it closer to running the tests. It was something that worked on my local machine to fix the failures for certain seeds. I'm not sure why it doesn't work on CI.
40dfaf5
to
da9288c
Compare
Workaround bug in devise
Has this ended up no superceded by other PR's, once discovered that it was a devise bug? I am not totally keeping up with them all, sorry. |
i think this may be no longer needed? |
I still prefer breaking this out into a discreet task. It's just a refactor of existing functionality. |
No description provided.