Skip to content

Commit

Permalink
Improve GH PR comments for flaky tests
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Sep 25, 2024
1 parent 1e563da commit b7d56f2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/add-flaky-test-label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,20 @@ jobs:
- name: 'Get PR number'
if: ${{ hashFiles('**/jobs-with-flaky-tests') != '' }}
run: gh run download $WORKFLOW_ID -n pr-number || true
- name: 'Download Flaky Run Reports'
if: ${{ hashFiles('**/pr-number') != '' }}
run: |
gh run download $WORKFLOW_ID -n flaky-run-report-linux-jvm-released || true
gh run download $WORKFLOW_ID -n flaky-run-report-linux-jvm-latest || true
gh run download $WORKFLOW_ID -n flaky-run-report-linux-native-released || true
gh run download $WORKFLOW_ID -n flaky-run-report-windows-jvm-latest || true
- name: 'Add "triage/flaky-test" label'
if: ${{ hashFiles('**/pr-number') != '' }}
run: |
gh pr edit "$(cat pr-number)" --add-label 'triage/flaky-test'
- name: 'Comment on PR about flaky tests'
if: ${{ hashFiles('**/pr-number') != '' }}
run: |
gh pr comment "$(cat pr-number)" --body "Following jobs contain at least one flaky test: $(cat jobs-with-flaky-tests)"
curl -Ls https://sh.jbang.dev | bash -s - app setup
~/.jbang/bin/jbang trust add https://raw.githubusercontent.com/quarkus-qe/flaky-run-reporter/main/jbang-scripts/
gh pr comment "$(cat pr-number)" --body "$(~/.jbang/bin/jbang https://raw.githubusercontent.com/quarkus-qe/flaky-run-reporter/main/jbang-scripts/GitHubPrCommentator.java overview-file=jobs-with-flaky-tests flaky-reports-file-prefix=flaky-run-report)"

0 comments on commit b7d56f2

Please sign in to comment.