Skip to content

Commit 60be7fc

Browse files
committed
Raise error for github workflow
1 parent 47c7720 commit 60be7fc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/workflows/python_workflow_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
- name: Prefect SPIKE only test
1616
shell: bash
1717
working-directory: /home/abuzarmahmood/Desktop/blech_clust
18-
run: python pipeline_testing/prefect_pipeline.py -s --raise-exception | tee ~/Desktop/blech_clust/github.log;
19-
if grep -q "Traceback" ~/Desktop/blech_clust/github.log; then exit 1; fi
18+
run: python pipeline_testing/prefect_pipeline.py -s --raise-exception 2>&1 | tee ~/Desktop/blech_clust/github.log;
19+
if grep -q "ERROR" ~/Desktop/blech_clust/github.log; then echo "ERROR detected by bash"; exit 1; fi
2020
EMG-Only:
2121
runs-on: self-hosted
2222
steps:

pipeline_testing/prefect_pipeline.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ def raise_error_if_error(process, stderr, stdout):
5151
print(stdout.decode('utf-8'))
5252
print('=== Process stderr ===\n\n')
5353
if process.returncode:
54+
print('ERROR')
5455
decode_err = stderr.decode('utf-8')
5556
raise Exception(decode_err)
5657
sys.exit(2)

0 commit comments

Comments
 (0)