mirror of
https://github.com/nick-fields/retry.git
synced 2026-02-12 08:05:29 +00:00
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:
20
.github/workflows/ci_cd.yml
vendored
20
.github/workflows/ci_cd.yml
vendored
@@ -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: ./
|
||||
|
||||
Reference in New Issue
Block a user