Skip to content

Commit b0ca1cd

Browse files
committed
chore: add validation for junit path and xml file readability in ci.yml
1 parent 5c69a53 commit b0ca1cd

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,23 @@ jobs:
188188
189189
mkdir test_results
190190
unzip my_artifact.zip -d test_results 2> /dev/null || true
191+
- name: Ensure junit-path exists and that all xml files are readable in path 'test_results/**/*xml' with this syntax
192+
run: |
193+
if [ ! -d "test_results" ]; then
194+
echo "test_results directory does not exist"
195+
exit 1
196+
fi
197+
if ! ls test_results/surefire-reports/*xml 1> /dev/null 2>&1; then
198+
echo "No xml files found in test_results directory"
199+
exit 1
200+
fi
201+
if ! ls -l test_results/surefire-reports/*xml 1> /dev/null 2>&1; then
202+
echo "Not all xml files in test_results directory are readable"
203+
exit 1
204+
fi
205+
206+
echo "All xml files in test_results directory are readable"
207+
ls -l test_results/surefire-reports/*xml
191208
192209
- name: Setup tmate session
193210
uses: mxschmitt/action-tmate@v3.19

0 commit comments

Comments
 (0)