-
Notifications
You must be signed in to change notification settings - Fork 43
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
Go test only checks main_test.go #17
Comments
I think this needs to change from this: export function runBuilder(options: BuildBuilderSchema, context: BuilderContext): Observable<BuilderOutput> {
return from(context.getProjectMetadata(context?.target?.project)).pipe(
map((project) => {
const root = project.root
const sources = `-v ${root}/**/*.go`
return runGoCommand(context, 'test', [sources])
}),
)
} to this: export function runBuilder(options: BuildBuilderSchema, context: BuilderContext): Observable<BuilderOutput> {
return from(context.getProjectMetadata(context?.target?.project)).pipe(
map((project) => {
const sources = `./... -v`; // also could include -race by default
return runGoCommand(context, 'test', [sources], { cwd: project.root});
}),
)
} |
The best approach it think, it would be to allow any extra arg be passed, that would allowd to had for example |
@beeman let me know if you want me to PR on this |
Also forgot about this, in the "test": {
"builder": "@nx-go/nx-go:test",
"options": {
"main": "apps/api/main_test.go"
}
} to just: "test": {
"builder": "@nx-go/nx-go:test"
} |
@beeman I do not have permissions to push a new branch |
@Narven you can create a Pr by forking this repo and creating a branch on your fork. Then you should be able to open a PR here. |
This is now fixed in version 1.3.0 |
Thanks for the suggestion! These are available and enabled by default in 1.4.0. |
nx-go/packages/nx-go/src/builders/test/builder.ts
Line 11 in d6fe943
Uses go test /apps/name/**/*.go However this seems to only check the main_test.go. Perhaps
apps/name/...
might work better.I can help if needed.
The text was updated successfully, but these errors were encountered: