From 3a6d6937402cb057c57714cd06ea0717df197adb Mon Sep 17 00:00:00 2001 From: Jesse Newland Date: Thu, 25 May 2023 12:15:32 +0000 Subject: [PATCH] docs --- README.md | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 2f092b1..8a4598f 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,14 @@ # workflow-run-history -Adds a Markdown Step Summary explaining the historical performance and success rate of a workflow over the previous month. +Adds a Markdown Step Summary explaining the historical performance and success rate of a workflow over the previous week. -### Not yet implemented - -- Compare performance / success rate against default branch -- Custom date rages +- Compares performance / success rate against other workflows runs on the default branch, PRs, and tags +- Allows setting performance and success rate targets +- Outputs values that indicate whether or not the workflow is meeting its targets ## Example -

Workflow Run History over the last month (20 total runs)

-

Success rate: 75% (15 successes out of 20 runs)

-

15 successful runs

-
PercentileSuccess duration in seconds
99th25
90th35
50th41
-

5 failing runs

-
PercentileSuccess duration in seconds
99th29
90th29
50th39
-

Run status breakdown

-
StatusPercent of total
success75%
failure25%
- +https://github.com/urcomputeringpal/workflow-run-history/actions/runs/5079482931 ## Usage @@ -41,5 +32,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: urcomputeringpal/workflow-run-history@v0 + id: history timeout-minutes: 2 + with: + # # Target performance + # Target an average workflow runtime of 60 seconds. + target-seconds: "60" + target-percentile: "50" + + # # Target success rates + # This workflow should complete 99% of the time on the default branch. + target-default-success-rate: "99" + # This workflow should complete 90% of the time on PRs. + target-pr-success-rate: "90" + - run: | + echo "This workflow run hit its target performance: ${{ steps.history.outputs.hit-target-seconds }}" + echo "This workflow has historically hit its target performance on PRs: ${{ steps.history.outputs.hit-target-pr-success-percentile }}" + echo "This workflow has historically hit its target success rate on main: ${{ steps.history.outputs.hit-target-default-success-rate }}" ```