Every process.env read in flaky-tests flows through a single resolveConfig()
function in @flaky-tests/core. The variables below are the complete surface —
nothing else is read anywhere in the codebase.
| Variable | Description | Default |
|---|
FLAKY_TESTS_LOG | Log level: silent, error, warn, debug | warn |
FLAKY_TESTS_LOG_FILE | Optional path to append every log line to (in addition to the console sink). Useful when the console is crowded or Bun buffers stdout. Write failures are swallowed so a broken sink never crashes the logger. | — |
FLAKY_TESTS_DISABLE | Set to 1 or true to turn the capture plugins into a no-op | — |
FLAKY_TESTS_RUN_ID | Override the generated run id. Set automatically by @flaky-tests/plugin-bun/run-tracked when it spawns bun test — most users never set this manually. | — |
FLAKY_TESTS_PROJECT | Explicit project name used to isolate runs in shared stores. Set to an empty string to opt out and write rows with a NULL project. | nearest package.json name, else cwd basename |
| Variable | Description | Default |
|---|
FLAKY_TESTS_STORE | Which backend to use: sqlite, turso, supabase, postgres, or any custom type you’ve registered via definePlugin. | sqlite |
FLAKY_TESTS_STORE_MODULE | Explicit module specifier for the dispatcher to import(). Overrides the @flaky-tests/store-<type> convention — use this for forks or third-party adapters that live under a different package name. | — |
FLAKY_TESTS_DB | SQLite database path (used only when FLAKY_TESTS_STORE=sqlite). | node_modules/.cache/flaky-tests/failures.db |
FLAKY_TESTS_CONNECTION_STRING | Connection string for the chosen remote store. libsql://… for Turso, postgres://… for Postgres, https://…supabase.co for Supabase. | — |
FLAKY_TESTS_AUTH_TOKEN | Auth token for Turso (optional for local file DBs) or Supabase (anon / service role key). | — |
| Variable | Description | Default |
|---|
FLAKY_TESTS_WINDOW | Detection window length in days. Also settable via --window <n> on the CLI. | 7 |
FLAKY_TESTS_THRESHOLD | Minimum recent failures required to flag a test as flaky. Also settable via --threshold <n> on the CLI. | 2 |
| Variable | Description | Default |
|---|
GITHUB_TOKEN | Token used to open issues when the CLI is invoked with --create-issue. | — |
GITHUB_REPOSITORY | owner/repo for issue creation. Set automatically inside GitHub Actions. | — |
| Variable | Description | Default |
|---|
BROWSER | Override the command used to open the generated HTML report. Standard xdg convention. | platform default |
These are only read by getTestCredentials() in integration test files. They
do not affect production runtime.
| Variable | Description |
|---|
INTEGRATION | Set to 1 to opt into integration-tier tests. |
TURSO_TEST_URL | libSQL URL for the Turso integration suite. |
POSTGRES_TEST_URL | Postgres URL for the Postgres integration suite. |
SUPABASE_TEST_URL | Supabase project URL for the Supabase integration suite. |
SUPABASE_TEST_KEY | Supabase anon/service-role key for the Supabase integration suite. |
FLAKY_TESTS_TURSO_LIVE | Set to 1 to opt into the store-turso live integration test against a real hosted Turso DB. |
TURSO_LIVE_URL | libSQL URL of the throwaway DB used by the live Turso test. |
TURSO_LIVE_TOKEN | Auth token for the throwaway DB used by the live Turso test. |
When using the brewpirate/flaky-tests GitHub Action, inputs map to
FLAKY_TESTS_* env vars automatically. See
Action inputs for the mapping.
For the CLI: --flag > environment variable > default. For stores: options
passed to the constructor > environment variable > default. If you pass
dbPath to new SqliteStore({ dbPath: '...' }), that wins over
FLAKY_TESTS_DB.