Skip to content

Commit

Permalink
ci syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans committed Nov 20, 2024
1 parent ef65f4b commit 1c1399c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/wipac-cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ jobs:
uses: actions/setup-python@v4
- name: Create a mock dataset structure
run: |
set -e
set -euo pipefail
job_range_dpaths=(
/tmp/data/sim/{IceCube,Upgrade}/{2022,2023}/{generated,filtered}/{CORSIKA,neutrino-generator}/{77777,88888,99999}/{00-11,22-33,44-55}
)
Expand All @@ -154,20 +154,23 @@ jobs:
- name: Run script with matrix parameters
run: |
set -e
set -euo pipefail
echo "Testing with base_path=${{ matrix.base_path }}, num_datasets=${{ matrix.num_datasets }}"
./resources/sample-each-dataset.sh ${{ matrix.base_path }} 0.5 ${{ matrix.num_datasets }}
- name: Validate script execution
run: |
set -e
set -euo pipefail
# Check if the expected number of datasets are processed
processed_count=$(find ${{ matrix.base_path }} -name '*.histo.hdf5' | wc -l)
if [[ $processed_count -lt ${{ matrix.num_datasets }}} ]]; then
echo "Processed count: $processed_count"
echo "Expected count: ${{ matrix.num_datasets }}"
if [[ $processed_count -lt ${{ matrix.num_datasets }} ]]; then
echo "Script did not process the expected number of datasets!"
exit 1
fi
echo "All tests passed."

###########################################################################
# RELEASE
Expand Down
1 change: 1 addition & 0 deletions resources/cp-src-histos-tree.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -euo pipefail

########################################################################################
# Script Name: Simprod Histogram Sampler
Expand Down
1 change: 1 addition & 0 deletions resources/sample-each-dataset.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set -euo pipefail

#######################################################################################
# This script automates the sampling of histograms from dataset directories. It takes
Expand Down

0 comments on commit 1c1399c

Please sign in to comment.