Skippy-cov is a pytest plugin that intelligently selects and runs only relevant tests based on the current Git diff and previously collected coverage data. It aims to speed up CI/CD pipelines by avoiding unnecessary test runs by analyzing which code changes affect which tests. The current version is 0.2.2, with releases occurring periodically to refine its Git and pytest integration.
pip install skippy-covNo compatibility data collected yet for this library.
This quickstart demonstrates how to install skippy-cov, set up a minimal Git repository with a module and tests, run `pytest` to collect initial coverage data, then simulate code changes on a feature branch, and finally use `skippy-cov` with a Git diff to run only the affected tests.
Ensure you run `git init` in your project root before using skippy-cov, and make sure your changes are committed or staged for diffing.
Install all necessary packages: `pip install skippy-cov pytest coverage`.
Review your custom pytest plugins for compatibility. Most standard usage should be unaffected, but complex collection modifications might need adjustment.
Generate the diff into a temporary file first: `git diff main...HEAD -- path/to/file.py > /tmp/my_diff.diff`, then pass the path to the `--skippy-cov` flag: `pytest --skippy-cov=/tmp/my_diff.diff`.
Run `pip install skippy-cov`.
Ensure `skippy-cov` and `pytest` are installed and up-to-date: `pip install --upgrade skippy-cov pytest`. Verify `pytest --version` shows skippy-cov as a plugin.
Initialize a Git repository by running `git init` in your project's root directory or navigate to an existing Git repository.
Install Git on your system and ensure it's accessible from your command line. For Linux: `sudo apt-get install git`, for macOS: `brew install git`, for Windows: download from git-scm.com.