CI: Run a consumer's browser tests against the template under review - #18
Merged
Conversation
Nothing in this repository can be executed on its own: the templates are consumed as a submodule and rendered into an inline script, so their behaviour is only visible in an SDK that embeds one and drives it in a browser. Until now a change here reached every SDK with no check at all and was found, if at all, by whichever consumer bumped the submodule first. The job checks out pipeline-dotnet, copies this revision over the one it pins, and runs the JavaScript builder tests. It reports when the copy changed nothing, because the templates are embedded resources and an unchanged working tree would produce a pass that says nothing about the pull request. pipeline-dotnet is tested at main, which is what the change has to land against. Use the workflow_dispatch input to point it at a branch when the tests for a change are still in review themselves.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Nothing in this repository can be executed on its own. The templates are consumed as a submodule and rendered into an inline script, so their behaviour is only visible in an SDK that embeds one and drives it in a browser. Until now a change here reached every SDK with no check at all, and was found, if at all, by whichever consumer bumped the submodule first.
The job checks out
pipeline-dotnet, copies this revision over the one it pins, and runsFiftyOne.Pipeline.JavaScriptBuilderElementTests- the suite that renders the template through a real pipeline and drives it in headless Chrome.Verified on a pull request before being split out here: the swap reported
154 insertions(+), 51 deletions(-)against the pinned revision, the runner already has Google Chrome 150 and ChromeDriver 150, and the 52 tests passed in about two minutes.Notes on the design:
pipeline-dotnetis tested atmain, which is what a change here has to land against. Theworkflow_dispatchinput points it at a branch for the case where the tests covering a change are still in review themselves.Directory.Build.propsonly asks for the signing key whenBuiltOnCIis set, which this does not set.pipeline-dotnetis covered. The same templates feed the other language SDKs, and a sibling job per consumer follows the same shape.Merging this first means the open template pull requests pick the check up on their next push.