Skip to content

Commit 05613ad

Browse files
chore(main): Improve nightly test reports (googleapis#21475)
1 parent 495b19b commit 05613ad

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,4 +73,4 @@ jobs:
7373
env:
7474
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7575
run: |
76-
toys ci report-failures -v
76+
toys ci report-failures --github-action-id=${{ github.run_id }} -v

.toys/ci.rb

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@ def generate_failures_json
370370

371371
tool "report-failures" do
372372
flag :report_path, "--report-path=PATH", default: FAILURES_REPORT_PATH
373+
flag :github_action_id, "--github-action-id=ACTION_ID" do |f|
374+
f.desc "Github Action ID under which the CI is running. Optional."
375+
end
373376

374377
include :exec, e: true
375378
include :terminal
@@ -433,6 +436,11 @@ def encode_str str
433436

434437
def create_body dir, tasks
435438
now = Time.now.utc.strftime "%Y-%m-%d %H:%M:%S"
436-
"At #{now} UTC, detected failures in #{dir} for: #{tasks.join ', '}"
439+
messages = []
440+
messages << "At #{now} UTC, detected failures in #{dir} for: #{tasks.join ', '}."
441+
unless github_action_id.nil?
442+
messages << "The CI logs can be found [here](https://github.com/googleapis/google-cloud-ruby/actions/runs/#{github_action_id})"
443+
end
444+
messages.join "\n\n"
437445
end
438446
end

0 commit comments

Comments
 (0)