Repository navigation
Conversation
The build job's frontend step is named "Build and test frontend" but only builds, and nothing runs the Go tests either, so the 38 Jest tests and the backend tests under pkg/plugin never run in CI. Run `npm run test:ci` before the frontend build, and `go test ./pkg/...` after backend-compile.sh, which is what resolves go.sum. Signed-off-by: Zihan Dai <1436286758@qq.com>
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.
Follow-up to #134 (comment), where I said I would add
npm run test:ciandgo testto the build job.The
buildjob's frontend step is named "Build and test frontend" but only runsnpm run build, and no step runs the Go tests. So the three Jest suites insrc/and the tests inpkg/pluginnever run in CI.This change:
npm run test:cibeforenpm run buildTest backendstep withgo test ./pkg/...afterbackend-compile.sh. go.sum is not checked in, and the script'sgo mod tidyis what produces it, so the tests have to come after it.Checked locally in the same order (Node 22, Go 1.26):
npm cithen the Jest run: 3 suites, 38 tests passgo get -u github.com/grafana/grafana-plugin-sdk-go@v0.250.0 && go mod tidy(the dependency part ofbackend-compile.sh), thengo test ./pkg/...:pkg/pluginpassestableQuery.test.ts, the Jest run exits 1; with at.Fataladded totable_query_test.go,go testexits 1