Skip to content

Commit

Permalink
add explicit fails to pipeline run
Browse files Browse the repository at this point in the history
These will trigger CI fails to avoid false CI passes
  • Loading branch information
SamuelBrand1 committed Dec 17, 2024
1 parent 10a092b commit a2bea54
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion pipelines/tests/test_forecast_state.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,15 @@ if [ -z "$1" ]; then
fi

BASE_DIR="$1"

echo "TEST-MODE: Running forecast_state.py in test mode with base directory $BASE_DIR"
Rscript pipelines/generate_test_data.R "$BASE_DIR/private_data"
if [ $? -ne 0 ]; then
echo "TEST-MODE FAIL: Generating test data failed"
exit 1
else
echo "TEST-MODE: Finished generating test data"
fi
echo "TEST-MODE: Running forecasting pipeline"
python pipelines/forecast_state.py \
--disease "COVID-19" \
--state "CA" \
Expand All @@ -23,3 +30,10 @@ python pipelines/forecast_state.py \
--n-warmup 500 \
--score \
--eval-data-path "$BASE_DIR/private_data/nssp-archival-vintages"
if [ $? -ne 0 ]; then
echo "TEST-MODE FAIL: Forecasting/postprocessing/scoring pipeline failed"
exit 1
else
echo "TEST-MODE: Finished forecasting/postprocessing/scoring pipeline"
fi
echo "TEST-MODE: All finished successfully"

0 comments on commit a2bea54

Please sign in to comment.