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
Caching broken when go.mod not at top level #370
Comments
I think the caching worked for you, it even says so in the message: "Cache hit occurred". Not entirely as expected, though, as it ignores the golangci-lint-action/src/cache.ts Line 63 in 009d239
I suppose either |
Fixed by #629 |
I'm trying to run the action in a sub directory of my mono repo but it seems that the caching isn't working properly meaning my linting job is always slow as it has to build from scratch.
Step defined as
I noticed the following in the post Job action log
Cache hit occurred on the primary key golangci-lint.cache-2707-nogomod, not saving cache.
which surprised me as I do have a go.mod file.
Looking at the code for the action I think it is because the cache key build doesn't respect the change of working directory and as the linter is running in the top level of the repository looks for the go.mod file there.
I've been able to work around by handling caching myself as below but would reduce complexity if the listing action could handle this.
The text was updated successfully, but these errors were encountered: