Add on_retry_command input to optionally run cmd before a retry (#33)

* minor: add on_retry_command input to optionally run cmd before a retry

* test: add test for on-retry-command failure
This commit is contained in:
Nick Fields authored and GitHub committed 2021-01-04 21:32:32 -05:00
1 parent 025c480d85
commit 7c68161adf
6 files changed
+107 -25

No files matched your search

+20
View File
@@ -60,6 +60,26 @@ jobs:
actual: ${{ steps.sad_path_wait_sec.outputs.exit_error }}
comparison: contains
- name: on-retry-cmd
id: on-retry-cmd
uses: ./
continue-on-error: true
with:
timeout_minutes: 1
max_attempts: 3
command: node -e "process.exit(1)"
on_retry_command: node -e "console.log('this is a retry command')"
- name: on-retry-cmd (on-retry fails)
id: on-retry-cmd-fails
uses: ./
continue-on-error: true
with:
timeout_minutes: 1
max_attempts: 3
command: node -e "process.exit(1)"
on_retry_command: node -e "throw new Error('This is an on-retry command error')"
- name: sad-path (error)
id: sad_path_error
uses: ./