Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve GitHub PR comments on flaky tests #2047

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 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,19 @@ 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-latest || true
gh run download $WORKFLOW_ID -n flaky-run-report-linux-native-latest || 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)"
Loading