Skip to content

Commit

Permalink
run_batch_script.yml: Split error checking into multiple steps
Browse files Browse the repository at this point in the history
This will improve debugging, so that we can see what step actually fails. Also, by splitting
up the steps, we can continue to the next step on failure of an earlier step thanks to
"if: always()".
  • Loading branch information
joshuacwnewton committed Dec 7, 2024
1 parent feff833 commit 263189b
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion .github/workflows/run_batch_script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,26 @@ jobs:
fi
done
- name: Check that script executed without error
- name: Check results (no error logs)
if: always()
run: |
cd "${{ github.event.repository.name }}/multi_subject/output/log"
[ "$(compgen -G "process_data_sub-0*.log")" ] # Log files should exist
- name: Check results (no error logs)
if: always()
run: |
cd "${{ github.event.repository.name }}/multi_subject/output/log"
[ ! "$(compgen -G "err.process_data_sub-0*.log")" ] # Error files should NOT exist
- name: Check results (warnings in log)
if: always()
run: |
cd "${{ github.event.repository.name }}/multi_subject/output/log"
# grep -iF "warning" process_data_sub-01.log
- name: Check results (errors in log)
if: always()
run: |
cd "${{ github.event.repository.name }}/multi_subject/output/log"
grep -iF "error" process_data_sub-01.log

0 comments on commit 263189b

Please sign in to comment.