Comments (9)
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});
}),
)
}
from nx-go.
Also forgot about this, in the workspace.json
it the builder needs to change from:
"test": {
"builder": "@nx-go/nx-go:test",
"options": {
"main": "apps/api/main_test.go"
}
}
to just:
"test": {
"builder": "@nx-go/nx-go:test"
}
from nx-go.
@beeman let me know if you want me to PR on this
Hey @Narven - I would really appreciate a PR! I should have some time this weekend en next weekend to look at nx-go!
I'm about to start a pet project that uses Go so I'll be using this again!
from nx-go.
The best approach it think, it would be to allow any extra arg be passed, that would allowd to had for example -race
or -cover
from nx-go.
@beeman let me know if you want me to PR on this
from nx-go.
@beeman I do not have permissions to push a new branch
from nx-go.
@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.
from nx-go.
This is now fixed in version 1.3.0
from nx-go.
The best approach it think, it would be to allow any extra arg be passed, that would allowd to had for example
-race
or-cover
Thanks for the suggestion! These are available and enabled by default in 1.4.0.
from nx-go.
Related Issues (20)
- Deprecated V1 plugin
- KNOWN ISSUE: THIS PLUGIN DOES NOT WORK WITH NX 17 HOT 1
- nx-go has a new maintainer! (was: Sunsetting nx-go) HOT 7
- Add external dependencies to Nx Graph
- Give a try to Nx Cloud HOT 1
- Your feedback on beta of nx-go 3 HOT 25
- Feature request: tidy executor
- Feature request: get executor
- Generators strip away '/' and '-' from project names when creating go.mod
- Can you have more than a main.go file in an app? HOT 4
- Performance issue nx graph HOT 4
- Can we maintain multiple go.mod with nx-go? HOT 2
- gow suggested in the readme.md not working properly HOT 1
- Does/will it support nx 16? HOT 2
- Is there nxgo/cli docker image update available ? HOT 1
- nx test: run single test instead all test in the package
- Update stats on the Nx Plugin Registry HOT 1
- Replace go with tinygo
- Cannot generate project with [email protected] HOT 7
- Plugin version V1 deprecated. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nx-go.