act_runner/pkg/runner/testdata
Markus Wolf 943a0e6eea
implement pre and post steps (#1089)
* feat: add post step to actions and add state command

This commit includes requried changes for running post steps
for local and remote actions.
This allows general cleanup work to be done after executing
an action.

Communication is allowed between this steps, by using the
action state.

* feat: collect pre and post steps for composite actions

* refactor: move composite action logic into own file

* refactor: restructure composite handling

* feat: run composite post steps during post step lifecycle

* refactor: remove duplicate log output

* feat: run all composite post actions in a step

Since composite actions could have multiple pre/post steps inside,
we need to run all of them in a single top-level pre/post step.

This PR includes a test case for this and the correct order of steps
to be executed.

* refactor: remove unused lines of code

* refactor: simplify test expression

* fix: use composite job logger

* fix: make step output more readable

* fix: enforce running all post executor

To make sure every post executor/step is executed, it is chained
with it's own Finally executor.

* fix: do not run post step if no step result is available

Having no step result means we do not run any step (neither pre
nor main) and we do not need to run post.

* fix: setup defaults

If no pre-if or post-if is given, it should default to 'always()'.
This could be set even if there is no pre or post step.
In fact this is required for composite actions and included post
steps to run.

* fix: output step related if expression

* test: update expectation

* feat: run pre step from actions (#1110)

This PR implements running pre steps for remote actions.
This includes remote actions using inside local composite actions.

* fix: set correct expr default status checks

For post-if conditions the default status check should be
always(), while for all other if expression the default status
check is success()

References:
https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
https://docs.github.com/en/actions/creating-actions/metadata-syntax-for-github-actions#runspost-if

* fix: remove code added during rebase
2022-05-24 13:36:06 +00:00
..
act-composite-env-test refactor: remove composite action runcontext workaround (#1085) 2022-05-11 19:06:05 +00:00
actions fix: set composite outputs on failure (#945) 2022-01-21 08:08:30 -08:00
actions-environment-and-context-tests refactor: remove composite action runcontext workaround (#1085) 2022-05-11 19:06:05 +00:00
basic feat: add node16 support (#922) 2021-12-22 19:34:18 +00:00
checkout
commands
composite-fail-with-output fix: set composite outputs on failure (#945) 2022-01-21 08:08:30 -08:00
container-hostname feat: add node16 support (#922) 2021-12-22 19:34:18 +00:00
defaults-run
dir with spaces
env-and-path
evalmatrix fix: deep evaluate matrix strategy (#964) 2022-02-15 16:35:02 +00:00
evalmatrix-merge-array fix: deep evaluate matrix strategy (#964) 2022-02-15 16:35:02 +00:00
evalmatrix-merge-map fix: deep evaluate matrix strategy (#964) 2022-02-15 16:35:02 +00:00
evalmatrixneeds fix: deep evaluate matrix strategy (#964) 2022-02-15 16:35:02 +00:00
evalmatrixneeds2 fix: deep evaluate matrix strategy (#964) 2022-02-15 16:35:02 +00:00
fail feat: add node16 support (#922) 2021-12-22 19:34:18 +00:00
if-env-act Test: env.ACT in if condition of the workflow (#965) 2022-01-25 09:27:27 -08:00
if-expressions
issue-104
issue-122
issue-141
issue-228
issue-597 Expression evaluator fixes (#1009) 2022-02-25 18:39:50 +00:00
issue-598
job-container feat: add node16 support (#922) 2021-12-22 19:34:18 +00:00
job-container-non-root
job-nil-step fix: panic if a step in a job is nil (#1145) 2022-05-12 19:23:34 +00:00
job-status-check
local-action-docker-url
local-action-dockerfile Feature: uses in composite (#793) 2021-12-22 19:19:50 +00:00
local-action-js feat: add node16 support (#922) 2021-12-22 19:34:18 +00:00
local-action-via-composite-dockerfile Feature: uses in composite (#793) 2021-12-22 19:19:50 +00:00
localdockerimagetest_
mask-values refactor: remove composite action runcontext workaround (#1085) 2022-05-11 19:06:05 +00:00
matrix
matrix-include-exclude
node
non-existent-action Fix: regression run after failure (#971) 2022-01-27 16:20:44 +00:00
outputs
parallel feat: add node16 support (#922) 2021-12-22 19:34:18 +00:00
pull-request
python
remote-action-docker
remote-action-js
runs-on
secrets
shells feat: add node16 support (#922) 2021-12-22 19:34:18 +00:00
steps-context
uses-action-with-pre-and-post-step implement pre and post steps (#1089) 2022-05-24 13:36:06 +00:00
uses-and-run-in-one-step
uses-composite Expression evaluator fixes (#1009) 2022-02-25 18:39:50 +00:00
uses-composite-with-error Feature: uses in composite (#793) 2021-12-22 19:19:50 +00:00
uses-composite-with-pre-and-post-steps implement pre and post steps (#1089) 2022-05-24 13:36:06 +00:00
uses-docker-url fix: don't overwrite with empty cmd/entrypoint (#1076) 2022-03-29 18:00:52 +00:00
uses-github-empty
uses-github-full-sha
uses-github-noref
uses-github-path
uses-github-root
uses-github-short-sha
uses-nested-composite Feature: uses in composite (#793) 2021-12-22 19:19:50 +00:00
uses-workflow fix: return error on reusable workflows (#1093) 2022-03-30 17:20:45 +00:00
workdir