Skip to content

[BUG]: Enable Turborepo caching for deterministic test to speed up CI #1825

@Sam-61s

Description

@Sam-61s

Describe the bug.

In turbo.json , all core test tasks ( test:unit , test:integration , test:update , test:integration:update , and test ) are configured with "cache": false . This forces Turborepo to re-run tests on every CI execution — even when no inputs changed — leading to slower pipelines, worse developer experience, and higher compute costs.

Now

  • Test tasks always execute because caching is explicitly disabled ( "cache": false ) for all test-related tasks in turbo.json .

Expected behavior

  • Re-running CI on the same commit should produce cache hits for deterministic test tasks.
  • test:update and test:integration:update should continue to always execute (no caching), since they intentionally mutate snapshots.

Screenshots

Image

Video
two consecutive runs of the same test command with no code changes in between,
the second run still executes tests (no cache hit), confirming Turbo caching is effectively disabled for tests.
https://github.com/user-attachments/assets/fb15b281-8d5a-4d86-a5ab-dffeaedbf680

How to Reproduce

  1. run unit tests twice without changing files:
  • npm run generator:test:unit
  • npm run generator:test:unit
  1. Observe the second run still executes tests instead of reporting a cache hit.

🖥️ Device Information [optional]

  • Operating System (OS):
  • Browser:
  • Browser Version:

👀 Have you checked for similar open issues?

  • I checked and didn't find similar issue

🏢 Have you read the Contributing Guidelines?

Are you willing to work on this issue ?

Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions