Skip to content

Commit ce1cf85

Browse files
committed
chore: simplify xml file checks in ci.yml by removing specific directory references
1 parent b17ee9d commit ce1cf85

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -177,11 +177,11 @@ jobs:
177177
jq -r '.workflow_runs[0].id')
178178
179179
ARTIFACT_IDS=$(curl \
180-
-H "Accept: application/vnd.github+json" \
181-
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
182-
-H "X-GitHub-Api-Version: 2022-11-28" \
183-
https://api.github.com/repos/${{ github.repository }}/actions/runs/"${LAST_SUCCESSFUL_RUN_ID}"/artifacts | \
184-
jq -r '.artifacts | sort_by(.created_at) | .[] | select(.name | startswith("testresults-")) | .id')
180+
-H "Accept: application/vnd.github+json" \
181+
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
182+
-H "X-GitHub-Api-Version: 2022-11-28" \
183+
https://api.github.com/repos/${{ github.repository }}/actions/runs/"${LAST_SUCCESSFUL_RUN_ID}"/artifacts | \
184+
jq -r '.artifacts | sort_by(.created_at) | .[] | select(.name | startswith("testresults-")) | .id')
185185
186186
echo "ARTIFACT_IDS=$ARTIFACT_IDS" >> $GITHUB_ENV
187187
@@ -205,17 +205,17 @@ jobs:
205205
echo "test_results directory does not exist"
206206
exit 1
207207
fi
208-
if ! ls test_results/surefire-reports/*xml 1> /dev/null 2>&1; then
208+
if ! ls test_results/*xml 1> /dev/null 2>&1; then
209209
echo "No xml files found in test_results directory"
210210
exit 1
211211
fi
212-
if ! ls -l test_results/surefire-reports/*xml 1> /dev/null 2>&1; then
212+
if ! ls -l test_results/*xml 1> /dev/null 2>&1; then
213213
echo "Not all xml files in test_results directory are readable"
214214
exit 1
215215
fi
216216
217217
echo "All xml files in test_results directory are readable"
218-
ls -l test_results/surefire-reports/*xml
218+
ls -l test_results/*xml
219219
220220
- name: Setup tmate session
221221
uses: mxschmitt/action-tmate@v3.19

0 commit comments

Comments
 (0)