Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewland committed May 25, 2023
1 parent 3c417b4 commit 3a6d693
Showing 1 changed file with 21 additions and 14 deletions.
35 changes: 21 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

<h1>Workflow Run History over the last month (20 total runs)</h1>
<h1>Success rate: 75% (15 successes out of 20 runs)</h1>
<h1>15 successful runs</h1>
<table><tr><th>Percentile</th><th>Success duration in seconds</th></tr><tr><td>99th</td><td>25</td></tr><tr><td>90th</td><td>35</td></tr><tr><td>50th</td><td>41</td></tr></table>
<h1>5 failing runs</h1>
<table><tr><th>Percentile</th><th>Success duration in seconds</th></tr><tr><td>99th</td><td>29</td></tr><tr><td>90th</td><td>29</td></tr><tr><td>50th</td><td>39</td></tr></table>
<h1>Run status breakdown</h1>
<table><tr><th>Status</th><th>Percent of total</th></tr><tr><td>success</td><td>75%</td></tr><tr><td>failure</td><td>25%</td></tr></table>

https://github.com/urcomputeringpal/workflow-run-history/actions/runs/5079482931

## Usage

Expand All @@ -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 }}"
```

0 comments on commit 3a6d693

Please sign in to comment.