From 263189bab4f9b2b047b5c7c496ba7674f55d5870 Mon Sep 17 00:00:00 2001 From: Joshua Newton Date: Fri, 6 Dec 2024 20:04:15 -0500 Subject: [PATCH] `run_batch_script.yml`: Split error checking into multiple steps 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()". --- .github/workflows/run_batch_script.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.github/workflows/run_batch_script.yml b/.github/workflows/run_batch_script.yml index b7e8e3b..a53c613 100644 --- a/.github/workflows/run_batch_script.yml +++ b/.github/workflows/run_batch_script.yml @@ -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