Skip to content

Commit da4bddb

Browse files
committed
Bla
1 parent 9506bf3 commit da4bddb

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

action.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,41 @@ runs:
4949
${{ inputs.branch }} \
5050
> flaky_tests.json
5151
52+
- name: Dump flaky_tests.json
53+
shell: bash
54+
run: |
55+
echo "flaky_tests.json content:"
56+
cat flaky_tests.json
57+
58+
## Upload artifact
59+
- name: Upload
60+
uses: actions/upload-artifact@v4
61+
with:
62+
path: flaky_tests.json
63+
5264
- name: Post message to ${{ inputs.slack-channel-name }} Slack channel
65+
id: slackmessage
5366
if: success()
5467
uses: slackapi/[email protected]
5568
with:
5669
payload-file-path: './flaky_tests.json'
5770
webhook: ${{ inputs.slack-incoming-webhooks-url }}
5871
webhook-type: incoming-webhook
5972

73+
- name: Print action result
74+
shell: bash
75+
run: |
76+
echo "Action result:"
77+
echo "${{ steps.slackmessage.outputs.result }}"
78+
echo "Action status:"
79+
echo "${{ steps.slackmessage.outputs.status }}"
80+
echo "Action message:"
81+
echo "${{ steps.slackmessage.outputs.message }}"
82+
echo "Action error:"
83+
echo "${{ steps.slackmessage.outputs.error }}"
84+
echo "Action response:"
85+
echo "${{ steps.slackmessage.outputs.response }}"
86+
6087
branding:
6188
icon: 'list'
6289
color: 'blue'

find_flaky_tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ def print_for_slack(occurrences: List[Occurrence], state: AppState):
156156
for ann_path, occrs in items:
157157
nice_path = truncate_left(ann_path, MAX_FILENAME_LENGTH)
158158
count = len(occrs)
159-
content += f"{count}x `{nice_path}`"
159+
content += f"{count}x `{nice_path}` "
160160
occrs.sort(key=lambda o: o.commit.timestamp, reverse=True)
161-
recent_occrs = occrs[:10]
161+
recent_occrs = occrs[:1]
162162
content += " ".join([f"<{occr.check_url}|{i+1}> " for i, occr in enumerate(recent_occrs)])
163163
content += '\\n'
164164

0 commit comments

Comments
 (0)