@@ -35,41 +35,61 @@ jobs:
3535 echo "Saving expexted JUnit reports SHA $SHA"
3636 echo "expected-junit-reports-sha=${SHA}" >> "$GITHUB_ENV"
3737
38- - name : Download JUnit reports
38+ - name : Checkout JUnit reports (split-index 1)
39+ uses : ./checkout-junit-reports
40+ with :
41+ split-index : 1
42+ git-branch : junit-reports-it-${{ github.sha }}-download
43+ path : junit-reports-first-index-1
44+
45+ - name : Checkout JUnit reports (split-index 0)
3946 uses : ./checkout-junit-reports
4047 with :
48+ split-index : 0
4149 git-branch : junit-reports-it-${{ github.sha }}-download
42- path : junit-reports-first
50+ path : junit-reports-first-index-0
51+
52+ - name : Checkout JUnit reports (split-index 2)
53+ uses : ./checkout-junit-reports
54+ with :
55+ split-index : 2
56+ git-branch : junit-reports-it-${{ github.sha }}-download
57+ path : junit-reports-first-index-2
4358
4459 - name : Assert JUnit reports
45- working-directory : junit-reports-first
4660 run : |
47- REPORT_FILE="first.xml"
48- if [[ ! -f "$REPORT_FILE" ]]; then
49- echo "Error: JUnit report $REPORT_FILE not found!"
50- ls -l
51- exit 1
52- fi
53- FILE_COUNT=$(ls -1 | wc -l)
54- if [[ "$FILE_COUNT" -ne 1 ]]; then
55- echo "Error: Expected 1 JUnit reports, but found $FILE_COUNT files!"
56- ls -l
57- exit 1
58- fi
61+ for SPLIT_INDEX in {0..2}; do
62+ echo "Checking JUnit reports for split-index $SPLIT_INDEX"
63+ cd junit-reports-first-index-$SPLIT_INDEX
64+ REPORT_FILE="first.xml"
65+ if [[ ! -f "$REPORT_FILE" ]]; then
66+ echo "Error: JUnit report $REPORT_FILE not found!"
67+ ls -l
68+ exit 1
69+ fi
70+ FILE_COUNT=$(ls -1 | wc -l)
71+ if [[ "$FILE_COUNT" -ne 1 ]]; then
72+ echo "Error: Expected 1 JUnit reports, but found $FILE_COUNT files!"
73+ ls -l
74+ exit 1
75+ fi
76+ cd ..
77+ done
5978
6079 - name : Update JUnit reports
61- working-directory : junit-reports-first
80+ working-directory : junit-reports-first-index-0
6281 run : |
6382 touch second.xml
6483 git add *.xml
6584 git config user.name "${{ github.actor }}"
6685 git config user.email "${{ github.actor }}@users.noreply.github.com"
6786 git commit -m "Second commit for JUnit reports branch"
68- git push
87+ git push origin HEAD:junit-reports-it-${{ github.sha }}-download
6988
7089 - name : Download JUnit reports
7190 uses : ./checkout-junit-reports
7291 with :
92+ split-index : 0
7393 git-branch : junit-reports-it-${{ github.sha }}-download
7494 path : junit-reports-second
7595
0 commit comments