Skip to content

Commit

Permalink
add assertions for retry_on_exit_code tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nick-fields committed Apr 19, 2022
1 parent cf714f3 commit 679f4bb
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci_cd.yml
Expand Up @@ -87,6 +87,14 @@ jobs:
retry_on_exit_code: 2
max_attempts: 3
command: node -e "process.exit(2)"
- uses: nick-invision/assert-action@v1
with:
expected: failure
actual: ${{ steps.retry_on_exit_code_expected.outcome }}
- uses: nick-invision/assert-action@v1
with:
expected: 3
actual: ${{ steps.retry_on_exit_code_expected.outputs.total_attempts }}

- name: retry_on_exit_code (with unexpected error code)
id: retry_on_exit_code_unexpected
Expand All @@ -97,6 +105,14 @@ jobs:
retry_on_exit_code: 2
max_attempts: 3
command: node -e "process.exit(1)"
- uses: nick-invision/assert-action@v1
with:
expected: failure
actual: ${{ steps.retry_on_exit_code_unexpected.outcome }}
- uses: nick-invision/assert-action@v1
with:
expected: 1
actual: ${{ steps.retry_on_exit_code_unexpected.outputs.total_attempts }}

- name: on-retry-cmd (on-retry fails)
id: on-retry-cmd-fails
Expand Down

0 comments on commit 679f4bb

Please sign in to comment.