mirror of
https://github.com/nick-fields/retry.git
synced 2026-02-09 22:58:02 +00:00
add multi line example and test
This commit is contained in:
20
.github/workflows/ci_cd.yml
vendored
20
.github/workflows/ci_cd.yml
vendored
@@ -141,7 +141,6 @@ jobs:
|
||||
expected: 2
|
||||
actual: ${{ steps.retry_on_error.outputs.exit_code }}
|
||||
|
||||
|
||||
# timeout tests (takes longer to run so run last)
|
||||
- name: sad-path (timeout)
|
||||
id: sad_path_timeout
|
||||
@@ -225,7 +224,7 @@ jobs:
|
||||
timeout_minutes: 1
|
||||
max_attempts: 2
|
||||
shell: cmd
|
||||
command: "dir"
|
||||
command: 'dir'
|
||||
- uses: nick-invision/assert-action@v1
|
||||
with:
|
||||
expected: 2
|
||||
@@ -269,6 +268,23 @@ jobs:
|
||||
max_attempts: 2
|
||||
shell: python
|
||||
command: print('1', '2', '3')
|
||||
- name: Multi-line multi-command Test
|
||||
uses: ./
|
||||
with:
|
||||
timeout_minutes: 1
|
||||
max_attempts: 2
|
||||
command: |
|
||||
print('a', 'b', 'c')
|
||||
print('1', '2', '3')
|
||||
- name: Multi-line single-command Test
|
||||
uses: ./
|
||||
with:
|
||||
timeout_minutes: 1
|
||||
max_attempts: 2
|
||||
shell: cmd
|
||||
command: >-
|
||||
echo "this is
|
||||
a test"
|
||||
|
||||
# runs on push to master only
|
||||
cd:
|
||||
|
||||
27
README.md
27
README.md
@@ -153,6 +153,33 @@ with:
|
||||
on_retry_command: npm run cleanup-flaky-script-output
|
||||
```
|
||||
|
||||
### Run multi-line, multi-command script
|
||||
|
||||
```yaml
|
||||
name: Multi-line multi-command Test
|
||||
uses: ./
|
||||
with:
|
||||
timeout_minutes: 1
|
||||
max_attempts: 2
|
||||
command: |
|
||||
print('a', 'b', 'c')
|
||||
print('1', '2', '3')
|
||||
```
|
||||
|
||||
### Run multi-line, single-command script
|
||||
|
||||
```yaml
|
||||
name: Multi-line single-command Test
|
||||
uses: ./
|
||||
with:
|
||||
timeout_minutes: 1
|
||||
max_attempts: 2
|
||||
shell: cmd
|
||||
command: >-
|
||||
echo "this is
|
||||
a test"
|
||||
```
|
||||
|
||||
## Requirements
|
||||
|
||||
NodeJS is required for this action to run. This runs without issue on all GitHub hosted runners but if you are running into issues with this on self hosted runners ensure NodeJS is installed.
|
||||
|
||||
Reference in New Issue
Block a user