From e4de4dea5cdbb0d91dd9d5f3e9b2e35ea33b56f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Tue, 27 Feb 2024 13:52:23 +0100 Subject: [PATCH] ci: Make `find` for test reports more specific MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/.test.yml | 6 +++--- .github/workflows/.windows.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/.test.yml b/.github/workflows/.test.yml index cf172abcf9..a334a4bcbb 100644 --- a/.github/workflows/.test.yml +++ b/.github/workflows/.test.yml @@ -97,7 +97,7 @@ jobs: - name: Create summary run: | - teststat -markdown $(find /tmp/reports -type f -name '*.json' -print0 | xargs -0) >> $GITHUB_STEP_SUMMARY + find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY docker-py: runs-on: ubuntu-20.04 @@ -299,7 +299,7 @@ jobs: - name: Create summary run: | - teststat -markdown $(find /tmp/reports -type f -name '*.json' -print0 | xargs -0) >> $GITHUB_STEP_SUMMARY + find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY integration-cli-prepare: runs-on: ubuntu-20.04 @@ -438,4 +438,4 @@ jobs: - name: Create summary run: | - teststat -markdown $(find /tmp/reports -type f -name '*.json' -print0 | xargs -0) >> $GITHUB_STEP_SUMMARY + find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY diff --git a/.github/workflows/.windows.yml b/.github/workflows/.windows.yml index fc89a27dec..da553fdc82 100644 --- a/.github/workflows/.windows.yml +++ b/.github/workflows/.windows.yml @@ -215,7 +215,7 @@ jobs: - name: Create summary run: | - teststat -markdown $(find /tmp/artifacts -type f -name '*.json' -print0 | xargs -0) >> $GITHUB_STEP_SUMMARY + find /tmp/artifacts -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY integration-test-prepare: runs-on: ubuntu-latest @@ -546,4 +546,4 @@ jobs: - name: Create summary run: | - teststat -markdown $(find /tmp/reports -type f -name '*.json' -print0 | xargs -0) >> $GITHUB_STEP_SUMMARY + find /tmp/reports -type f -name '*-go-test-report.json' -exec teststat -markdown {} \+ >> $GITHUB_STEP_SUMMARY