-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Don't run go tests when only docs are changed #7497
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
Comments
This goes both ways, doesn't it? If a change only affects Go code, why build the docs on the PR? |
Good point! Would it be safe to assume that if nothing changed in the |
Re: paths-filter, if we can get by with the simple built-in stuff, that would perhaps be better. If I remember correctly, the website builds are triggered from netlify, I don't know if it's easy to make them conditional... 🤔
I think it's at least a good enough approximation. Even if something, like auto-generated CLI parameter docs, technically brings in a dependency between the Go code and the website (I might misremember things!), we still have a full build of the website on every push to main. (This is something to also reconsider, to waste less resources.) |
To be clear, any small improvement is well worth the while here. We don't need pull this all off right away. |
Just remembered that we already skip the website build if it's deemed unnecessary 😅 3b01b9a |
I think something like this would be preferred (over a new action step):
However, it'd involve breaking down our pr.yaml into separate workflows. I'm unsure if that's worse, I guess it means things are in lots of places... |
Short description
Noticed in a recent PR that only changed one markdown file the entire Go workflow is run (build, tests, linting). We can detect what files are changed and only run the necessary checks. Not sure if there is a native way to do this in Github Actions but could use this project: https://github.com/dorny/paths-filter to filter based on files changed.
Expected behavior
Only the required tests are run depending on the files changed in the PR.
The text was updated successfully, but these errors were encountered: