Skip to content

Commit e4de4de

Browse files
committed
ci: Make find for test reports more specific
Don't use all `*.json` files blindly, take only these that are likely to be reports from go test. Also, use `find ... -exec` instead of piping results to `xargs`. Signed-off-by: Paweł Gronowski <[email protected]>
1 parent 8cdb5a9 commit e4de4de

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/.test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
-
9898
name: Create summary
9999
run: |
100-
teststat -markdown $(find /tmp/reports -type f -name '*.json' -print0 | xargs -0) >> $GITHUB_STEP_SUMMARY
100+
find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY
101101
102102
docker-py:
103103
runs-on: ubuntu-20.04
@@ -299,7 +299,7 @@ jobs:
299299
-
300300
name: Create summary
301301
run: |
302-
teststat -markdown $(find /tmp/reports -type f -name '*.json' -print0 | xargs -0) >> $GITHUB_STEP_SUMMARY
302+
find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY
303303
304304
integration-cli-prepare:
305305
runs-on: ubuntu-20.04
@@ -438,4 +438,4 @@ jobs:
438438
-
439439
name: Create summary
440440
run: |
441-
teststat -markdown $(find /tmp/reports -type f -name '*.json' -print0 | xargs -0) >> $GITHUB_STEP_SUMMARY
441+
find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY

.github/workflows/.windows.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ jobs:
215215
-
216216
name: Create summary
217217
run: |
218-
teststat -markdown $(find /tmp/artifacts -type f -name '*.json' -print0 | xargs -0) >> $GITHUB_STEP_SUMMARY
218+
find /tmp/artifacts -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY
219219
220220
integration-test-prepare:
221221
runs-on: ubuntu-latest
@@ -546,4 +546,4 @@ jobs:
546546
-
547547
name: Create summary
548548
run: |
549-
teststat -markdown $(find /tmp/reports -type f -name '*.json' -print0 | xargs -0) >> $GITHUB_STEP_SUMMARY
549+
find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY

0 commit comments

Comments
 (0)