A GitHub Action that displays a timechart of CheckRuns related to a given sha. Useful for debugging the performance of GitHub Actions workflows. Uses the legendary bt.sh
for ASCII timechart display.
[ 5.000s ] ├──┤ * YAMBURGER
[ 0.000s ] . * kubevalidator
[ 8.000s ] ├────┤ * kubectl-diff (code)
[ 7.000s ] ├───┤ * kubectl-diff (cameras)
[ 10.000s ] ├──────┤ * kubectl-diff (geryon)
[ 10.000s ] ├──────┤ * kubectl-diff (kubernetes-dashboard)
[ 0.000s ] . * deploy-label
[ 80.762s ] ├─────────────────────────────────────────┤ * bt
[ 0.000s ] . * deploy
[ 0.000s ] . * kubectl-apply
[ 0.000s ] . * required-builds
[ 8.000s ] ├────┤ * kubectl-diff (home-assistant)
[ 8.000s ] ├────┤ * kubectl-diff (motion)
[ 11.000s ] ├──────┤ * kubectl-diff (kube-system)
[ 8.000s ] ├────┤ * kubectl-diff (mysql)
[ 6.000s ] ├──┤ * kubectl-diff (unifi)
[ 0.000s ] . * diff
one '.' unit is less than: 1.249s
total time: 71.522s
This action can be run as the last step in a workflow:
- name: checkrun-timechart
uses: urcomputeringpal/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
# Optionally output the timechart as a summary
# SUMMARY: "true"
OR as a separate workflow entirely using a preceding step that waits for other CheckRuns to complete:
name: checkrun-timechart
on:
pull_request:
types: [synchronize]
jobs:
checkrun-timechart:
runs-on: ubuntu-latest
steps:
- name: wait
uses: "WyriHaximus/[email protected]"
with:
ignoreActions: checkrun-timechart
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: checkrun-timechart
uses: urcomputeringpal/[email protected]
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
SHA: "${{ github.event.pull_request.head.sha }}"
TRACE_START: "${{ github.event.pull_request.updated_at }}"