act_runner/pkg/runner/testdata
Markus Wolf 1891c72ab1
fix: continue jobs + steps after failure (#840)
* fix: continue jobs + steps after failure

To allow proper if expression handling on jobs and steps (like always,
success, failure, ...) we need to continue running all executors in
the prepared chain.
To keep the error handling intact we add an occurred error to the
go context and handle it later in the pipeline/chain.

Also we add the job result to the needs context to give expressions
access to it.
The needs object, failure and success functions are split between
run context (on jobs) and step context.

Closes #442

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>

* style: correct linter warnings

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>

* fix: job if value defaults to success()

As described in the documentation, a default value of "success()" is
applied when no "if" value is present on the job.

https://docs.github.com/en/actions/learn-github-actions/expressions#job-status-check-functions

Co-authored-by: Markus Wolf <mail@markus-wolf.de>

* fix: check job needs recursively

Ensure job result includes results of previous jobs

Co-authored-by: Markus Wolf <markus.wolf@new-work.se>

* test: add runner test for job status check functions

Co-authored-by: Markus Wolf <markus.wolf@new-work.se>

* test: add unit tests for run context if evaluation

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>

* refactor: move if expression evaluation

Move if expression evaluation into own function (step context) to
better support unit testing.

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>

* test: add unit tests for step context if evaluation

Co-authored-by: Markus Wolf <markus.wolf@new-work.se>

* fix: handle job error more resilient

The job error is not stored in a context map instead of a context
added value.
Since context values are immutable an added value requires to keep
the new context in all cases. This is fragile since it might slip
unnoticed to other parts of the code.

Storing the error of a job in the context map will make it more stable,
since the map is always there and the context of the pipeline is stable
for the whole run.

* feat: steps should use a default if expression of success()

* test: add integration test for if-expressions

* chore: disable editorconfig-checker for yaml multiline string

Co-authored-by: Björn Brauer <zaubernerd@zaubernerd.de>
Co-authored-by: Björn Brauer <bjoern.brauer@new-work.se>
2021-12-08 20:57:42 +00:00
..
actions fix: correctly unmarshal entrypoint (#876) 2021-11-13 19:43:31 +00:00
basic Add proper support for working-directory & fix command builder (#772) 2021-08-10 19:40:20 +00:00
checkout Hotfix: Skip Checkout Regression (#680) 2021-05-10 15:12:57 +00:00
commands Update images, fix extrapath (#723) 2021-06-10 23:12:05 +00:00
container-hostname fix: set `sh` as default shell for containers (#853) 2021-11-03 11:47:47 -07:00
defaults-run
dir with spaces Add proper support for working-directory & fix command builder (#772) 2021-08-10 19:40:20 +00:00
env-and-path Fix regex for GITHUB_ENV parsing (#893) 2021-11-19 17:36:50 +00:00
fail Update images, fix extrapath (#723) 2021-06-10 23:12:05 +00:00
if-expressions fix: continue jobs + steps after failure (#840) 2021-12-08 20:57:42 +00:00
issue-104
issue-122
issue-141
issue-228
issue-597
issue-598
job-container Update images, fix extrapath (#723) 2021-06-10 23:12:05 +00:00
job-container-non-root Update images, fix extrapath (#723) 2021-06-10 23:12:05 +00:00
job-status-check fix: continue jobs + steps after failure (#840) 2021-12-08 20:57:42 +00:00
local-action-docker-url Refactor local, composite actions and run steps (#712) 2021-06-10 15:28:23 +00:00
local-action-dockerfile fix: interpolate env for step actions (#872) 2021-11-12 15:21:18 -08:00
local-action-js Refactor local, composite actions and run steps (#712) 2021-06-10 15:28:23 +00:00
localdockerimagetest_ Fix docker: invalid reference format (#767) 2021-08-09 18:16:31 +00:00
matrix
matrix-include-exclude
node
outputs Don't interpolate joboutputs, before job is done (#894) 2021-11-24 15:49:08 +00:00
parallel Read localaction's from container (#719) 2021-08-03 17:39:56 +00:00
pull-request
python
remote-action-docker
remote-action-js
runs-on
secrets
shells fix: set `sh` as default shell for containers (#853) 2021-11-03 11:47:47 -07:00
steps-context Add more steps context support (#887) 2021-11-27 17:55:26 +00:00
uses-and-run-in-one-step
uses-composite Read localaction's from container (#719) 2021-08-03 17:39:56 +00:00
uses-docker-url Update images, fix extrapath (#723) 2021-06-10 23:12:05 +00:00
uses-github-empty
uses-github-full-sha refactor: return more errors, add more tests (#679) 2021-05-08 03:29:03 +00:00
uses-github-noref
uses-github-path
uses-github-root
uses-github-short-sha refactor: return more errors, add more tests (#679) 2021-05-08 03:29:03 +00:00
workdir Add proper support for working-directory & fix command builder (#772) 2021-08-10 19:40:20 +00:00