diff --git a/.github/actions/upload-flaky-tests/action.yml b/.github/actions/upload-flaky-tests/action.yml index 5e31d5dde3..c34b9f5083 100644 --- a/.github/actions/upload-flaky-tests/action.yml +++ b/.github/actions/upload-flaky-tests/action.yml @@ -1,5 +1,9 @@ name: Report flaky test description: Finds flaky tests and uploads reports +inputs: + job-name: + description: 'Job name to help identify the job' + required: true runs: using: composite @@ -20,7 +24,25 @@ runs: done 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<> $GITHUB_OUTPUT + echo "job-summary.properties" >> $GITHUB_OUTPUT echo "$FLAKES" >> $GITHUB_OUTPUT echo "EOF" >> $GITHUB_OUTPUT fi @@ -28,6 +50,6 @@ runs: - uses: actions/upload-artifact@v3 if: ${{ steps.flaky-tests.outputs.flakes }} with: - name: flaky-tests-${{ github.job }} + name: flaky-tests-${{ github.job }}-${{ join(matrix.*, '-') }} path: ${{ steps.flaky-tests.outputs.flakes }} - if-no-files-found: error + if-no-files-found: error \ No newline at end of file diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30e57c08f9..f0bf9be49f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -106,6 +106,10 @@ jobs: - uses: ./.github/actions/upload-flaky-tests name: Upload flaky tests + env: + GH_TOKEN: ${{ github.token }} + with: + job-name: Base IT quarkus-integration-tests: name: Quarkus IT