From 2eda7c6037b921ae88742b2ff29b20bb171497a6 Mon Sep 17 00:00:00 2001 From: Markus Wolf Date: Fri, 21 Jan 2022 17:10:26 +0100 Subject: [PATCH] feat: add skipped status as step result (#950) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Github sets the outcome and conclusion to skipped and this PR does the same during the pipeline run for the StepResults in act. Co-authored-by: Björn Brauer Co-authored-by: Björn Brauer --- pkg/model/step_result.go | 2 ++ pkg/runner/run_context.go | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkg/model/step_result.go b/pkg/model/step_result.go index cc44ee6c..86e5ebf3 100644 --- a/pkg/model/step_result.go +++ b/pkg/model/step_result.go @@ -7,11 +7,13 @@ type stepStatus int const ( StepStatusSuccess stepStatus = iota StepStatusFailure + StepStatusSkipped ) var stepStatusStrings = [...]string{ "success", "failure", + "skipped", } func (s stepStatus) MarshalText() ([]byte, error) { diff --git a/pkg/runner/run_context.go b/pkg/runner/run_context.go index 58cb2ac1..b5b0d434 100644 --- a/pkg/runner/run_context.go +++ b/pkg/runner/run_context.go @@ -326,6 +326,8 @@ func (rc *RunContext) newStepExecutor(step *model.Step) common.Executor { if !runStep { log.Debugf("Skipping step '%s' due to '%s'", sc.Step.String(), sc.Step.If.Value) + rc.StepResults[rc.CurrentStep].Conclusion = model.StepStatusSkipped + rc.StepResults[rc.CurrentStep].Outcome = model.StepStatusSkipped return nil }