Add job summary to flaky tests artifact (#16215)
This commit is contained in:
parent
ce6b737e33
commit
d81c4d7c0b
2 changed files with 28 additions and 2 deletions
24
.github/actions/upload-flaky-tests/action.yml
vendored
24
.github/actions/upload-flaky-tests/action.yml
vendored
|
@ -1,5 +1,9 @@
|
||||||
name: Report flaky test
|
name: Report flaky test
|
||||||
description: Finds flaky tests and uploads reports
|
description: Finds flaky tests and uploads reports
|
||||||
|
inputs:
|
||||||
|
job-name:
|
||||||
|
description: 'Job name to help identify the job'
|
||||||
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
|
@ -20,7 +24,25 @@ runs:
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ "$FLAKES" != "" ]; then
|
if [ "$FLAKES" != "" ]; then
|
||||||
|
PR="${{ github.event.number }}"
|
||||||
|
JOB_NAME="${{ inputs.job-name }}"
|
||||||
|
|
||||||
|
MATRIX="${{ join(matrix.*, ' - ') }}"
|
||||||
|
if [ "$MATRIX" != "" ]; then
|
||||||
|
JOB_NAME="$JOB_NAME ($MATRIX)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
JOB_URL=$(gh api repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs --jq ".jobs | map(select(.name == \"$JOB_NAME\")) | .[].html_url")
|
||||||
|
|
||||||
|
echo "job_name=$JOB_NAME" >> job-summary.properties
|
||||||
|
echo "job_url=$JOB_URL" >> job-summary.properties
|
||||||
|
if [ "$PR" != "" ]; then
|
||||||
|
echo "pr=$PR" >> job-summary.properties
|
||||||
|
echo "pr_url=https://github.com/${{ github.repository }}/pull/$PR" >> job-summary.properties
|
||||||
|
fi
|
||||||
|
|
||||||
echo "flakes<<EOF" >> $GITHUB_OUTPUT
|
echo "flakes<<EOF" >> $GITHUB_OUTPUT
|
||||||
|
echo "job-summary.properties" >> $GITHUB_OUTPUT
|
||||||
echo "$FLAKES" >> $GITHUB_OUTPUT
|
echo "$FLAKES" >> $GITHUB_OUTPUT
|
||||||
echo "EOF" >> $GITHUB_OUTPUT
|
echo "EOF" >> $GITHUB_OUTPUT
|
||||||
fi
|
fi
|
||||||
|
@ -28,6 +50,6 @@ runs:
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
if: ${{ steps.flaky-tests.outputs.flakes }}
|
if: ${{ steps.flaky-tests.outputs.flakes }}
|
||||||
with:
|
with:
|
||||||
name: flaky-tests-${{ github.job }}
|
name: flaky-tests-${{ github.job }}-${{ join(matrix.*, '-') }}
|
||||||
path: ${{ steps.flaky-tests.outputs.flakes }}
|
path: ${{ steps.flaky-tests.outputs.flakes }}
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -106,6 +106,10 @@ jobs:
|
||||||
|
|
||||||
- uses: ./.github/actions/upload-flaky-tests
|
- uses: ./.github/actions/upload-flaky-tests
|
||||||
name: Upload flaky tests
|
name: Upload flaky tests
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ github.token }}
|
||||||
|
with:
|
||||||
|
job-name: Base IT
|
||||||
|
|
||||||
quarkus-integration-tests:
|
quarkus-integration-tests:
|
||||||
name: Quarkus IT
|
name: Quarkus IT
|
||||||
|
|
Loading…
Reference in a new issue