Action inputs
The brewpirate/flaky-tests Action runs flaky-tests check on your failure database and optionally opens GitHub issues for new patterns.
- uses: brewpirate/flaky-tests@v1 with: store: turso connection-string: ${{ secrets.TURSO_URL }} auth-token: ${{ secrets.TURSO_AUTH_TOKEN }} github-token: ${{ secrets.GITHUB_TOKEN }} create-issues: 'true'Inputs
Section titled “Inputs”Required. The store backend to use.
| Value | Store |
|---|---|
sqlite | Local SQLite (not useful in CI — no shared state) |
turso | Turso remote SQLite |
supabase | Supabase |
postgres | PostgreSQL / Neon |
connection-string
Section titled “connection-string”Required for remote stores. The primary connection URL for the store.
| Store | Expected format |
|---|---|
turso | libsql://your-db.turso.io |
supabase | https://abcdef.supabase.co |
postgres | postgres://user:pass@host:5432/db |
auth-token
Section titled “auth-token”Required for Turso and Supabase. The authentication token or API key.
| Store | Value |
|---|---|
turso | Turso auth token from turso db tokens create |
supabase | Supabase anon key or service role key |
postgres | Not used (credentials embedded in connection-string) |
github-token
Section titled “github-token”Required for create-issues: true. A token with issues: write permission.
Use ${{ secrets.GITHUB_TOKEN }} for the built-in token, which is sufficient for creating issues in the same repository.
window-days
Section titled “window-days”Number of days in each detection window.
- Default:
7 - Type: string (number)
threshold
Section titled “threshold”Minimum number of failures in the current window to flag a test as flaky.
- Default:
2 - Type: string (number)
create-issues
Section titled “create-issues”Whether to open GitHub issues for new patterns.
- Default:
true - Type: string (
'true'or'false')
Required permissions
Section titled “Required permissions”When using create-issues: true, your job needs issues: write permission:
jobs: detect: runs-on: ubuntu-latest permissions: issues: write steps: - uses: brewpirate/flaky-tests@v1 with: # ...Outputs
Section titled “Outputs”The action exits with code 1 if new patterns are found, 0 if clean. You can use this to gate downstream steps:
- id: check uses: brewpirate/flaky-tests@v1 with: store: turso connection-string: ${{ secrets.TURSO_URL }} auth-token: ${{ secrets.TURSO_AUTH_TOKEN }} continue-on-error: true
- if: steps.check.outcome == 'failure' run: echo "Flaky tests detected! Check the issues tab."