-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(ci): Only run CI tests when related files changed #6145
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
Conversation
045d464
to
5fb8625
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea overall. This whole conditional test execution topic heavily reminds me of the academic "test case/suite selection" problem which TLDR boils down to finding a trade-off between fault detection capability (FDC) vs. test execution time. I think though that our particular case is a milder version of the problem as we can specify the dependencies pretty well and we're only making the decision on a package-level. So this doesn't make me too concerned about an overall loss in FDC
However, I think that the "we have to maintain this list" aspect is something we shouldn't underestimate and I'm thinking of two things we could do here:
- Note that this is a required pre-release step in our SDK release checklist in Notion
- Create a "package creation" checklist that contains this as a required step (this would probably be handy overall)
WDYT, does this sound reasonable?
We just all need to be aware that this exists and we need to take care of it.
Yeah, absolutely true! I'd also say that in our case it is a fine tradeoff to make, as new packages are added rarely. I think adding it to checklists should be a good step to ensure we don't forget about this! 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I vote we merge this in once the integrations
entry is adjusted. Just had two consecutive Ember test flakes in the morning when releasing.
814be88
to
c6045ef
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to sanity check - does this mean we don't run these tests on master or on release branches also? We should make sure we are only skipping tests for PRs.
Good point! And I'll do some testing to make sure it only applies to PR runs, not any other runs! 👍 |
c6045ef
to
d5150b1
Compare
This PR updates the build to only run the "special" CI test jobs when the respective packages have actually changed.
This is done using https://github.com/getsentry/paths-filter with a simple list of directories to watch. We can use the handy
shared
functionality to avoid duplicating the "global" dependencies.Note that we do need to keep the internal dependencies in sync (e.g. if nextjs starts to depend on another internal package, we need to add it), but IMHO that is acceptable.
This is how that looks:
Replaces #6067