test updates

Signed-off-by: Casey Lee <cplee@nektos.com>
This commit is contained in:
Casey Lee
2020-02-11 23:55:20 -08:00
parent f7252cbcf9
commit 64562d41ab
11 changed files with 37 additions and 30 deletions

View File

@@ -13,6 +13,7 @@ type Input struct {
reuseContainers bool
dryrun bool
forcePull bool
logOutput bool
}
func (i *Input) resolve(path string) string {

View File

@@ -36,6 +36,7 @@ func Execute(ctx context.Context, version string) {
rootCmd.PersistentFlags().StringVarP(&input.workflowsPath, "workflows", "W", "./.github/workflows/", "path to workflow files")
rootCmd.PersistentFlags().StringVarP(&input.workdir, "directory", "C", ".", "working directory")
rootCmd.PersistentFlags().BoolP("verbose", "v", false, "verbose output")
rootCmd.PersistentFlags().BoolVarP(&input.logOutput, "output", "o", false, "log output from steps")
rootCmd.PersistentFlags().BoolVarP(&input.dryrun, "dryrun", "n", false, "dryrun mode")
if err := rootCmd.Execute(); err != nil {
os.Exit(1)
@@ -94,6 +95,7 @@ func newRunCommand(ctx context.Context, input *Input) func(*cobra.Command, []str
ForcePull: input.forcePull,
ReuseContainers: input.reuseContainers,
Workdir: input.Workdir(),
LogOutput: input.logOutput,
}
runner, err := runner.New(config)
if err != nil {