Skip to content

Commit 68f3812

Browse files
authored
build: don't exit after first ingest test failure (#166)
so more diff's may be inspected.
1 parent 04b2e6f commit 68f3812

File tree

2 files changed

+36
-1
lines changed

2 files changed

+36
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ jobs:
143143
make install-ingest-gitlab
144144
make install-ingest-slack
145145
make install-ingest-wikipedia
146-
./test_unstructured_ingest/test-ingest.sh
146+
# only run ingest tests that check expected output diffs.
147+
bash inference/scripts/test-unstructured-ingest-helper.sh
147148
148149
changelog:
149150
runs-on: ubuntu-latest
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/usr/bin/env bash
2+
3+
# This is intended to be run from an unstructured checkout, not in this repo
4+
# The goal here is to see what changes the current branch would introduce to unstructured
5+
# fixtures
6+
7+
INGEST_COMMANDS=(
8+
test_unstructured_ingest/test-ingest-azure.sh
9+
test_unstructured_ingest/test-ingest-biomed-api.sh
10+
test_unstructured_ingest/test-ingest-biomed-path.sh
11+
test_unstructured_ingest/test-ingest-box.sh
12+
test_unstructured_ingest/test-ingest-dropbox.sh
13+
test_unstructured_ingest/test-ingest-gcs.sh
14+
test_unstructured_ingest/test-ingest-onedrive.sh
15+
test_unstructured_ingest/test-ingest-s3.sh
16+
)
17+
18+
EXIT_STATUSES=()
19+
20+
# Run each command and capture its exit status
21+
for INGEST_COMMAND in "${INGEST_COMMANDS[@]}"; do
22+
$INGEST_COMMAND
23+
EXIT_STATUSES+=($?)
24+
done
25+
26+
# Check for failures
27+
for STATUS in "${EXIT_STATUSES[@]}"; do
28+
if [[ $STATUS -ne 0 ]]; then
29+
echo "At least one ingest command failed! Scroll up to see which"
30+
exit 1
31+
fi
32+
done
33+
34+
echo "No diff's resulted from any ingest commands"

0 commit comments

Comments
 (0)