Skip to content

Commit 0101c7e

Browse files
committed
ci: add check for failed tests
1 parent 1e156a8 commit 0101c7e

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

.github/workflows/self-hosted.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
- name: Build library sources
4747
working-directory: ${{ env.build_dir }}
4848
run: cmake --build . --target all --verbose -j `nproc`
49-
49+
5050
test:
5151
name: Test ${{ matrix.os }} GCC ${{ matrix.gcc }} CUDA ${{ matrix.cuda }}
5252
needs: build
@@ -62,12 +62,18 @@ jobs:
6262
steps:
6363
- name: Run unit-tests
6464
working-directory: ${{ env.build_dir }}
65-
run: chmod +x scripts/run_tests_fallback.sh && ./scripts/run_tests_fallback.sh
65+
run: |
66+
output=$(chmod +x scripts/run_tests_fallback.sh && ./scripts/run_tests_fallback.sh)
67+
echo $output
68+
if echo "$output" | grep -qE "FAILED|ERROR"; then
69+
exit 1
70+
fi
6671
6772
- name: Run regression-tests
6873
working-directory: ${{ env.build_dir }}/python
6974
run: |
70-
echo "PYTHONPATH=`pwd`:$PYTHONPATH" >> $GITHUB_ENV
71-
cd tests
72-
python3 -m unittest discover -v
73-
# chmod +x run_tests.sh && ./run_tests.sh
75+
output=$(chmod +x run_tests.sh && ./run_tests.sh)
76+
echo $output
77+
if echo "$output" | grep -qE "FAILED|ERROR"; then
78+
exit 1
79+
fi

0 commit comments

Comments
 (0)