mirror of
https://github.com/nektos/act.git
synced 2026-04-26 01:15:51 +03:00
[PR #1004] [MERGED] feat: split job steps into its own files/structs #1723
Labels
No labels
area/action
area/cli
area/docs
area/image
area/runner
area/workflow
backlog
confirmed/not-planned
kind/bug
kind/discussion
kind/external
kind/feature-request
kind/question
meta/duplicate
meta/invalid
meta/need-more-info
meta/resolved
meta/wontfix
meta/workaround
needs-work
pull-request
review/not-planned
size/M
size/XL
size/XXL
stale
stale-exempt
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/act#1723
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/nektos/act/pull/1004
Author: @KnisterPeter
Created: 2/17/2022
Status: ✅ Merged
Merged: 3/22/2022
Merged by: @cplee
Base:
master← Head:fix-jobexecutor-refactoring📝 Commits (10+)
af1c41crefactor: split step_context into separate files9f427ccrefactor: introduce step factory and make steps testable23a4d32fix: run post steps in reverse order50f8b67test: add missing asserts for mockscc2cbc8refactor: use local reference instead of function86c27barefactor: correct typo in function name124d779test: use named structs8cd1914test: only expected valid callseb05c6aMerge branch 'master' into fix-jobexecutor-refactoring9845ab5refactor: use step-model to get step name📊 Changes
22 files changed (+2239 additions, -1001 deletions)
View changed files
📝
pkg/runner/action.go(+382 -4)📝
pkg/runner/action_test.go(+83 -3)➕
pkg/runner/container_mock_test.go(+68 -0)📝
pkg/runner/expression.go(+2 -3)📝
pkg/runner/expression_test.go(+4 -4)📝
pkg/runner/job_executor.go(+33 -10)📝
pkg/runner/job_executor_test.go(+187 -55)📝
pkg/runner/run_context.go(+13 -55)➕
pkg/runner/step.go(+145 -0)➕
pkg/runner/step_action_local.go(+85 -0)➕
pkg/runner/step_action_local_test.go(+101 -0)➕
pkg/runner/step_action_remote.go(+153 -0)➕
pkg/runner/step_action_remote_test.go(+102 -0)➖
pkg/runner/step_context.go(+0 -751)➖
pkg/runner/step_context_test.go(+0 -116)➕
pkg/runner/step_docker.go(+121 -0)➕
pkg/runner/step_docker_test.go(+106 -0)➕
pkg/runner/step_factory.go(+46 -0)➕
pkg/runner/step_factory_test.go(+81 -0)➕
pkg/runner/step_run.go(+166 -0)...and 2 more files
📄 Description
To make the steps more testable, we refactored the step context
into smaller parts. Each step kind is moved into its own struct and
file.
This does help keep structure and reduce interface size. This also
allows easier testing and mocking of each step.
This prepares to integrate action pre- and post-steps.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.