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
Tests can't run without yarn #50772
Comments
I don't think we should skip |
BTW, I know the current dockerfile is supposed to be used to run tests, but I'm planning to change that. The Dockerfile used for CI will be the same one that will be used in development, and that will for sure include yarn. That is another way to solve this issue. |
i ran into this today too after a Rails update where we have a docker setup where an image already has the precompiled assets (and no yarn executable). i learned though that https://github.com/rails/cssbundling-rails/blob/main/lib/tasks/cssbundling/build.rake#L63 |
This issue has been automatically marked as stale because it has not been commented on for at least three months. |
Steps to reproduce
docker build -t testimage:1 .
docker run -it testimage:1 /bin/bash
bin/rails test
Expected behavior
As the image already contains all precompiled assets I would expect the tests to be able to run successfully even without precompiling first.
Actual behavior
bin/rails test
now always runstest:prepare
, which tries to compile the assets and therefore crashes, because the default Dockerfile doesn't keep yarn in the image.I want an option to skip running
test:prepare
when running tests.System configuration
Rails version: 7.1.2
Ruby version: 3.1.4
The text was updated successfully, but these errors were encountered: