Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: extract setupAction into ActionReader #986

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

ZauberNerd
Copy link
Contributor

This change extracts the functionality of reading an action.y(a)ml or
creation of a (Synthetic Action) into its own type to enable better
unit testing / mocking of those IO operations.

This is done in preparation for the implementation of pre/post action
support in act.

This change extracts the functionality of reading an `action.y(a)ml` or
creation of a `(Synthetic Action)` into its own type to enable better
unit testing / mocking of those IO operations.

This is done in preparation for the implementation of pre/post action
support in act.

Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
@ZauberNerd ZauberNerd requested a review from a team as a code owner February 8, 2022 19:55
@codecov
Copy link

codecov bot commented Feb 8, 2022

Codecov Report

Merging #986 (a9d0666) into master (4f8da0a) will increase coverage by 0.67%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #986      +/-   ##
==========================================
+ Coverage   57.50%   58.18%   +0.67%     
==========================================
  Files          32       34       +2     
  Lines        4594     4618      +24     
==========================================
+ Hits         2642     2687      +45     
+ Misses       1729     1706      -23     
- Partials      223      225       +2     
Impacted Files Coverage Δ
pkg/runner/run_context.go 79.34% <76.47%> (-0.31%) ⬇️
pkg/runner/job_executor.go 82.92% <82.92%> (ø)
pkg/runner/action.go 84.21% <84.21%> (ø)
pkg/runner/step_context.go 85.83% <86.95%> (+4.20%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e23223a...a9d0666. Read the comment docs.

@mergify mergify bot merged commit e4f0080 into nektos:master Feb 8, 2022
@ZauberNerd ZauberNerd deleted the refactor/setup-action branch February 8, 2022 20:18
ZauberNerd added a commit to ZauberNerd/act that referenced this pull request Feb 9, 2022
This commit cleans up a some naming nitpicks and interface errors that
were introduced in nektos#986

* add `fileWriter` argument to `readAction`
* do not export the `actionReader` interface
* rename `actionyamlReader` to `actionYamlReader`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants