Skip to content

Commit dc1867d

Browse files
committed
Edit main.yml so workflow runs
1 parent 56feb3b commit dc1867d

1 file changed

Lines changed: 7 additions & 17 deletions

File tree

.github/workflows/main.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -91,35 +91,25 @@ jobs:
9191
cd tests
9292
9393
#launch all chunks in background and record PIDs + labels
94-
decalre -a pics
95-
declare -a label_by_pid
96-
94+
pids=""
9795
for chunk_index in $(seq 1 $total_chunks); do
9896
echo "Running chunk $chunk_index of $total_chunks"
9997
uv run python test_diffusion.py --total_chunks $total_chunks --chunk_index $chunk_index &
100-
pid=$!
101-
pids+=("$pid")
102-
label_by_pid["$pid"]="chunk_$chunk_index"
98+
pids="$pids $!"
10399
done
104100
105101
# wait for each and track failures
106102
fail=0
107-
for pid in "${pids[@]}"; do
108-
if ! wait "$pid"; do
109-
echo "${label_by_pid[$pid]} failed (PID $pid)"
103+
for pid in $pids; do
104+
if ! wait "$pid"; then
105+
echo "A chunk (PID $pid) failed"
110106
fail=1
111107
else
112-
echo "${label_by_pid[$pid]} passed (PID $pid)"
108+
echo "A chunk (PID $pid) passed"
113109
fi
114110
done
115111
116-
# make step fail if any chunk failed
117-
if [ "$fail" -ne 0 ]; then
118-
echo "One or more chunks failed."
119-
exit 1
120-
fi
121-
echo "All chunks completed."
122-
112+
exit "$fail"
123113
124114
# - name: Test with pytest
125115
# run: |

0 commit comments

Comments
 (0)