Skip to content

Test the Go JavaScript builder against the template under review - #47

Draft
jwrosewell wants to merge 1 commit into
rcfrom
feature/go-consumer-test
Draft

jwrosewell wants to merge 1 commit into
rcfrom
feature/go-consumer-test

Conversation

@jwrosewell

@jwrosewell jwrosewell commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Problem

consumer-tests.yml builds the JavaScript builders of .NET, Java, Node, Python, PHP and Rust against a change to the template, so a change that suits one builder and breaks another is found here. Go's builder in 51degrees-go renders the same template and is not among them, so a change that breaks it is found only once Go's copy of the template moves.

What changed

All in .github/workflows/consumer-tests.yml.

  • A go job, built as the rust job is. It checks out 51degrees-go at main, or at the new go-ref input when the workflow is started by hand. It copies the template under review over Go's embedded copy, pipeline/elements/javascriptbuilder/javascript-templates/JavaScriptResource.mustache, and says whether that copy differs from the revision under review, as the PHP and Rust jobs do. It also puts the template in the folder of 51degrees-go's javascript-templates submodule, because Go's tests render the submodule's template and check the embedded copy equals it (shared_template_test.go). Then it runs go test on the javascriptbuilder package, with the Go version pipeline/go.mod names.
  • The comment at the top counts seven builders, three of which carry a copy.

Runs

The checks on this pull request ran on b164ffd, merged into rc e74ad3b.

  • Consumer tests, run 43668436768, passed in all seven jobs. The new 51degrees-go JavaScript builder job checked out 51degrees-go main, gave the notice that Go's copy is identical to the revision under review, set up Go 1.22.12 from pipeline/go.mod, and passed every test of the javascriptbuilder package, TestTemplateIsTheSharedTemplate and TestScriptIsTheSharedTemplateRendered among them, so the shared template was read rather than skipped. The PHP and Rust jobs warn that their copies differ from the revision under review, which this change does not touch.
  • Template tests, run 43668436851, and Only rc into main, run 43668437222, passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant