Skip to content

Commit

Permalink
feat: implemented --skip-tests flag
Browse files Browse the repository at this point in the history
  • Loading branch information
10ko authored and thsig committed Jul 10, 2019
1 parent da5b854 commit dde191f
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions garden-service/src/commands/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import {
StringsParameter,
handleTaskResults,
PrepareParams,
BooleanParameter,
} from "./base"
import { STATIC_DIR } from "../constants"
import { processModules } from "../process"
Expand All @@ -47,6 +48,9 @@ const devOpts = {
`,
alias: "hot",
}),
"skip-tests": new BooleanParameter({
help: "Disable running the tests",
}),
}

type Args = typeof devArgs
Expand All @@ -68,7 +72,7 @@ export class DevCommand extends Command<Args, Opts> {
Examples:
garden dev
garden dev --hot-reload=foo-service # enable hot reloading for foo-service
garden dev --skip-tests=foo-service # enable hot reloading for foo-service
garden dev --hot=foo-service,bar-service # enable hot reloading for foo-service and bar-service
garden dev --hot=* # enable hot reloading for all compatible services
`
Expand Down Expand Up @@ -129,9 +133,12 @@ export class DevCommand extends Command<Args, Opts> {
? (await updatedGraph.withDependantModules([module]))
: [module]

tasks.push(...flatten(
await Bluebird.map(testModules, m => getTestTasks({ garden, log, module: m, graph: updatedGraph })),
))
if (!opts["skip-tests"]) {
tasks.push(...flatten(
await Bluebird.map(testModules, m => getTestTasks({ garden, log, module: m, graph: updatedGraph })),
))
}


tasks.push(...await getDependantTasksForModule({
garden,
Expand Down

0 comments on commit dde191f

Please sign in to comment.