Skip to content
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

Empty cache created in CI mode #1164

Open
kuhelbeher opened this issue Jul 14, 2023 · 1 comment
Open

Empty cache created in CI mode #1164

kuhelbeher opened this issue Jul 14, 2023 · 1 comment
Milestone

Comments

@kuhelbeher
Copy link

Describe the bug
When running betterer ci command with --cache option it creates empty cache file if it there wasn't cache file before.

To Reproduce

  • run betterer ci --cache command without .betterer.cache file created
  • check that .betterer.cache file doesn't have list of the files although it was created

Content of the cache file after running betterer ci --cache command:

{
  "version": 2,
  "testCache": {}
}

Expected behavior
A .betterer.cache file created with list of files

Versions (please complete the following information):

  • OS: Windows, Linux
  • Betterer Version: 5.4.0
  • Node Version: 18.16.0

Additional context
In our project we don't want to keep cache file in our git repo. Instead we want to generate it on CI, upload it on server and reuse it. But with this issue it's impossible to implement.

@phenomnomnominal phenomnomnominal added this to the V6 milestone Jul 16, 2023
@phenomnomnominal
Copy link
Owner

The initial design was that the cache would always be disabled in ci (based on the infra I was working with!) but I can see how this would be wanted. If I make this change, any existing config with ci --cache would start having caching which would probably be unexpected (or they just didn't know it wasn't working), so this will have to be a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants