Skip to content

Commit f095f3f

Browse files
Clarify how to run Tailwind command in CI (#230)
Co-authored-by: Mike Dalessio <mike.dalessio@gmail.com>
1 parent a4b2624 commit f095f3f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

README.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,13 @@ The `tailwindcss:build` is automatically attached to `assets:precompile`, so bef
2828

2929
### Building for testing
3030

31-
The `tailwindcss:build` is automatically attached to `test:prepare`, which runs before Rails tests. (Note that this currently only applies to rails `test:*` tasks (like `test:all` or `test:controllers`), not "rails test", as that doesn't load `test:prepare`).
31+
The `tailwindcss:build` task is automatically attached to the `test:prepare` Rake task. The `test:prepare` task is run before some test tasks (e.g. `test:all` and `test:controllers`), but not before the bare `test` task.
3232

33+
If your tests need Tailwind assets in your CI environment, it's best to be explicit and run this command:
34+
35+
```
36+
bin/rails test:prepare test
37+
```
3338

3439
### Update assets automatically
3540

0 commit comments

Comments
 (0)