Skip to main content

Fetch a list of flaky tests from a CircleCI project.

Project description

circleci-flaky

PyPI version Python versions

A command line utility to fetch a list of flaky tests from a CircleCI project.


Features

CircleCI provides an "Insights" section for your workflows, but it's limited in how far back the data goes. circleci-flaky allows you to specify up to 100 of the previous failed builds to check for recurring failed tests. It defaults to checking the master branch and displaying all failed tests, but both of these can be customized.

$ circleci-flaky -h
usage: circleci-flaky [-h] [--branch BRANCH] [--builds N] [--top N] project

Check a CircleCI project for flaky tests

positional arguments:
  project          the project to check

optional arguments:
  -h, --help       show this help message and exit
  --branch BRANCH  branch to check for failures (default: master)
  --builds N       number of failed builds to check (default: 30)
  --top N          limit results to the top N (default: all)

Installation

You can install circleci-flaky via pip from PyPI.

# If you run both Python 2 and 3 on your system, use pip3
sudo pip3 install circleci-flaky

# If you only run Python 3, you can just use pip
sudo pip install circleci-flaky

Usage

Because this tool leverages the CircleCI API, you'll need a Personal API Token. Navigate to https://circleci.com/account/api and create a new token (note it down).

Run the command like so:

CIRCLECI_TOKEN=your_token circleci-flaky org/repo

If you want to persist the token for multiple runs in your terminal, export it instead:

export CIRCLECI_TOKEN=your_token

then run the command without specifying the token:

circleci-flaky org/repo

Contributing

Contributors welcome!

License

Distributed under the terms of the MIT license, circleci-flaky is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

circleci-flaky-1.0.3.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file circleci-flaky-1.0.3.tar.gz.

File metadata

  • Download URL: circleci-flaky-1.0.3.tar.gz
  • Upload date:
  • Size: 3.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for circleci-flaky-1.0.3.tar.gz
Algorithm Hash digest
SHA256 2dfbae30801925970b789f52e8372c6499157425522266dd6c3ab8543faa3d42
MD5 6c82bb7b27453badc169b97213c21ea9
BLAKE2b-256 b4864bb47ac111201e83571d1383ae5eebd0c73bd7ac4beb4356df11b7d9184a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page