Skip to content

Commit

Permalink
Update test.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiaanspeck authored Sep 29, 2024
1 parent 60c318f commit 36ce7a1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,20 @@ jobs:
with:
token: ${{ secrets.CUSTOM_TOKEN }}

- name: Test exit code set in steps-output and as env "lychee_exit_code"
- name: Test exit code set in steps-output
id: lychee_exit_code_test
uses: ./
with:
args: -- inputdoesnotexist
continue-on-error: true

- name: Check exit code in steps.outputs
run: |
echo "Lychee exit code: ${{ steps.lychee_exit_code_test.outputs.exit_code }}"
if [[ "${{ steps.lychee_exit_code_test.outputs.exit_code }}" == "0" ]]; then
echo "Lychee correctly failed with exit code 0"
if [[ "${{ steps.lychee_exit_code_test.outputs.exit_code }}" == "1" ]]; then
echo "Lychee correctly failed with exit code 1"
else
echo "Unexpected exit code: ${{ steps.lychee_exit_code_test.outputs.exit_code }}"
echo "Expected exit code 0"
echo "Expected exit code 1"
exit 1
fi

0 comments on commit 36ce7a1

Please sign in to comment.