Skip to content

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'

Required. The store backend to use.

ValueStore
sqliteLocal SQLite (not useful in CI — no shared state)
tursoTurso remote SQLite
supabaseSupabase
postgresPostgreSQL / Neon

Required for remote stores. The primary connection URL for the store.

StoreExpected format
tursolibsql://your-db.turso.io
supabasehttps://abcdef.supabase.co
postgrespostgres://user:pass@host:5432/db

Required for Turso and Supabase. The authentication token or API key.

StoreValue
tursoTurso auth token from turso db tokens create
supabaseSupabase anon key or service role key
postgresNot used (credentials embedded in connection-string)

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.

Number of days in each detection window.

  • Default: 7
  • Type: string (number)

Minimum number of failures in the current window to flag a test as flaky.

  • Default: 2
  • Type: string (number)

Whether to open GitHub issues for new patterns.

  • Default: true
  • Type: string ('true' or 'false')

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:
# ...

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."