Skip to content

Commit

Permalink
GHA: added failure test step
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Apr 29, 2022
1 parent cf0688f commit 60d5be3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,18 @@ jobs:
with:
submodules: recursive

- name: Failure Test
shell: bash
run: |
chmod +x ./exit_with_error.sh
EXIT_CODE=0
"${{github.workspace}}/exit_with_error.sh" || EXIT_CODE=$?
if [[ "EXIT_CODE" != "0" ]]; then
echo "::warning:: Previous step failed!"
echo "::error:: Previous step failed!"
# exit 0
fi
- name: Setup Ninja
if: ${{ matrix.cmake_generator == 'Ninja' }}
uses: seanmiddleditch/gha-setup-ninja@master
Expand Down
2 changes: 2 additions & 0 deletions exit_with_error.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
echo "Error message"
exit 1

0 comments on commit 60d5be3

Please sign in to comment.