-
Notifications
You must be signed in to change notification settings - Fork 136
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
Optimise CI testing for third-party-polyfills #254
Conversation
…nto a separate function
… more readable variable names
… not for a dependency that is used within the feature (or the features dependencies).
…e not for a dependency that is used within the feature (or the features dependencies).
7d71770
to
a0773f5
Compare
}).filter(thirdPartyPolyfills => thirdPartyPolyfills !== undefined); | ||
|
||
const thirdPartyPolyfillHasBeenAddedOrChangedForFeature = intersection(thirdPartyPolyfillsWhichHaveBeenAddedOrChanged, thirdPartyDependenciesForFeature).length > 0; | ||
const packageJsonHasOnlyHadThirdPartyPolyfillChangesAppliedToIt = packageJsonDependenciesChanges.every(dep => thirdPartyPolyfills.includes(dep)); |
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.
if polyfill-library uses a one of these third-party-polyfills itself, then updating that will not run the other tests?
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.
You're right! Hmm, what do you think we should do here? Not use polyfills in polyfill-library itself?
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'm not sure, i was making sure that i'd understood that right before even thinking about it. it's a hard one
Currently when a change is made to the package.json file it will cause all the tests within the project to be executed in CI, which is painfully painfully slow and labor-intensive. This is a real issue for the project because we have the ability to use an npm package as the source of a polyfill (known as third-party-polyfills) and this is used more and more by contributors to the project.
We can speed up the scenario where a third-party-polyfill has been added or updated within the project by making the CI test-runner aware of the changes made within the package.json file and figure out if the changes were for a third-party-polyfill or not.