refactor: export and move shared contexts into pkg/model (#931)

This commit moves the githubContext, jobContext and stepResult structs
from the runner package to the model package in preparation for #908
because the expression.go file lives in the runner package and would
introduce cyclic dependencies with the exprparser package.

Co-authored-by: Markus Wolf <[email protected]>

Co-authored-by: Markus Wolf <[email protected]>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2021-12-22 19:52:09 +00:00
1 parent 558081242c
commit ed01f464ed
10 files changed
+132 -124

No files matched your search

+4 -4
View File
@@ -53,10 +53,10 @@ func TestRunContext_EvalBool(t *testing.T) {
"os": "Linux",
"foo": "bar",
},
StepResults: map[string]*stepResult{
StepResults: map[string]*model.StepResult{
"id1": {
Conclusion: stepStatusSuccess,
Outcome: stepStatusFailure,
Conclusion: model.StepStatusSuccess,
Outcome: model.StepStatusFailure,
Outputs: map[string]string{
"foo": "bar",
},
@@ -312,7 +312,7 @@ func TestGetGitHubContext(t *testing.T) {
Matrix: map[string]interface{}{},
Env: map[string]string{},
ExtraPath: []string{},
StepResults: map[string]*stepResult{},
StepResults: map[string]*model.StepResult{},
OutputMappings: map[MappableOutput]MappableOutput{},
}