Skip to main content

flaky-detector-cli

A tiny, zero-dependency command-line tool that uploads a JUnit XML test report to a flaky-detector project — the same thing the project's GitHub Actions snippet does with curl, packaged as a real command.

pip install flaky-detector-cli

Usage

pytest --junitxml=report.xml
flaky-detector submit report.xml

By default it reads two environment variables — the same two names your flaky-detector project's CI snippet already uses:

  • FLAKY_DETECTOR_URL — your backend's base URL
  • FLAKY_DETECTOR_TOKEN — the project's upload token

Everything else is auto-detected. In GitHub Actions, it reads GITHUB_SHA, GITHUB_REF_NAME, GITHUB_RUN_ID, and GITHUB_RUN_ATTEMPT automatically. Running locally, it falls back to your current git checkout for the commit and branch. You can override any of it explicitly:

flaky-detector submit report.xml \
  --url https://your-backend.example.com \
  --token YOUR_TOKEN \
  --commit abc1234 \
  --branch main \
  --run-id 42 \
  --run-attempt 1

Why not curl?

curl works fine and is what the project's own onboarding flow suggests first. This exists for people who'd rather not hand-build a multipart curl command in CI YAML, and for local use: run your suite, then flaky-detector submit report.xml to see the result on your dashboard without touching CI at all.

Exit codes

  • 0 — uploaded successfully
  • 1 — the server rejected the upload (bad token, malformed report, etc.); stderr has the reason
  • 2 — a required argument is missing (no URL/token, and none could be auto-detected)

Development

git clone https://github.com/YOURNAME/flaky-detector
cd flaky-detector/cli
pip install -e .

No dependencies to install for either running or developing this tool — only the Python standard library.

Release files for flaky-detector-cli 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flaky-detector-cli 0.1.1
File Size Uploaded
flaky_detector_cli-0.1.1.tar.gz 7.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flaky-detector-cli 0.1.1
File Interpreter ABI Platform
flaky_detector_cli-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.8 kB

Release files / flaky_detector_cli-0.1.1.tar.gz

Download URL flaky_detector_cli-0.1.1.tar.gz
Size 7.3 kB
Tags Source
SHA-256 checksum
How to use checksums
b27d65fc25aea707adaf89ff3895dd67b9557aa07bea406ca36d1f76493e354c
BLAKE2b-256 checksum
How to use checksums
11e4cf7512dd715ce96a0c587273391ab0b3c9569ede56d7056177f90e0a4f2b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.4

Release files / flaky_detector_cli-0.1.1-py3-none-any.whl

Download URL flaky_detector_cli-0.1.1-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
83c3e500b7f10881aea3729ddb4aed7d6e0ab29ce587b803b094425914d76f0f
BLAKE2b-256 checksum
How to use checksums
6c6ab09e994c2c3963b62e9af64170b46b5bbee4e97ddfcf2c526413db1176d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page