TL;DR: a flaky workflow is one that goes from pass to fail and back without a change that explains it. You can find yours by counting flips in the last 100 runs. Cilytics does that count for any public repo or a whole org.
Searching github actions flaky tests usually leads to advice on fixing a single test. First you need to know which workflows flip, because that is where the wasted re-runs go.
The rule Cilytics uses
A workflow is listed as flaky when it went from pass to fail, or back, at least three times in its last 100 runs, with no change in between that it can see. The workflows with the most flips come first.
Two details that keep the list honest:
- Pass rate counts passed runs against failed and timed-out runs. Cancelled and skipped runs are left out.
- Only the default branch is read. Pull-request runs are left out, so a broken PR does not look like a flaky workflow.
Check a repo in a minute
- Open cilytics.flisk.si.
- Paste
owner/nameor a github.com link and press Scan. - Read the health score out of 100, the pass rate and the Flaky and Slow lists.
No account is needed for public repos.
What to do with the list
- Start with the workflow that flips most.
- Look at the runs around each flip: same commit, different result is the signature of flakiness.
- Quarantine or fix it, and watch whether its flip count drops over the next 100 runs.
Track it over time
Run Cilytics hourly on your own org with one workflow. It writes a snapshot and a history file to a cilytics-data branch of your repo and serves the page from GitHub Pages. Pin the action to a commit SHA, and note that the default token reads public repos only.
Limits
This finds flaky workflows, not individual flaky tests. A workflow that runs 200 tests and fails when any one flips will show up as one flaky workflow. You still need your test runner's reports to find the test. A workflow that fails the same way every time is red, not flaky.
Source: github.com/flisk-sh/cilytics.
Top comments (0)