chore(mage): don't set api packages when they are not used
This commit is contained in:
parent
68998e90a4
commit
73a99ebd92
1 changed files with 1 additions and 1 deletions
|
@ -178,7 +178,6 @@ func initVars() {
|
||||||
setVersion()
|
setVersion()
|
||||||
setBinLocation()
|
setBinLocation()
|
||||||
setPkgVersion()
|
setPkgVersion()
|
||||||
setApiPackages()
|
|
||||||
setGoFiles()
|
setGoFiles()
|
||||||
Ldflags = `-X "` + PACKAGE + `/pkg/version.Version=` + VersionNumber + `" -X "main.Tags=` + Tags + `"`
|
Ldflags = `-X "` + PACKAGE + `/pkg/version.Version=` + VersionNumber + `" -X "main.Tags=` + Tags + `"`
|
||||||
}
|
}
|
||||||
|
@ -348,6 +347,7 @@ type Test mg.Namespace
|
||||||
// Runs all tests except integration tests
|
// Runs all tests except integration tests
|
||||||
func (Test) Unit() {
|
func (Test) Unit() {
|
||||||
mg.Deps(initVars)
|
mg.Deps(initVars)
|
||||||
|
setApiPackages()
|
||||||
// We run everything sequentially and not in parallel to prevent issues with real test databases
|
// We run everything sequentially and not in parallel to prevent issues with real test databases
|
||||||
args := append([]string{"test", Goflags[0], "-p", "1", "-timeout", "20m"}, ApiPackages...)
|
args := append([]string{"test", Goflags[0], "-p", "1", "-timeout", "20m"}, ApiPackages...)
|
||||||
runAndStreamOutput("go", args...)
|
runAndStreamOutput("go", args...)
|
||||||
|
|
Loading…
Reference in a new issue