
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Selectively run tests based on the current git diff and the collected data from previous tests runs
skippy-cov
is a tool that optimizes your Python testing workflow by filtering tests based on code changes. It takes a diff file from git and a .coverage
database (generated by coverage.py
) to identify and run only the tests relevant to the modified code. This significantly reduces testing time and resources.
To use this, you first need to generate the following required files:
.coverage
database using coverage.py
via pytest-cov
with test contexts pytest --cov=myproj --cov-context=test myproj/tests/
Then change your code and run
pytest --skippy-cov
In this case, skippy-cov
will analyze the changes and run only the tests that are relevant to the modified code.
You can also use skippy-cov
as a CLI on its own.
skippy-cov
that will list the tests selected.
The inputs for skippy-cov are the coverage file (default: .coverage
) and the diff information. By default, the diff is generated in the same way as a pull request (PR) on GitHub: only the changes introduced by your branch compared to the target branch are considered. This is done using the git diff <target>...HEAD
(triple-dot) syntax.
You can specify the coverage file and a branch or ref to diff against (e.g., the main branch):
skippy-cov --diff main --coverage-file .coverage
or equivalently
pytest --skippy-cov --skippy-cov-diff main --skippy-cov-coverage-file .coverage
You can also provide a diff file:
git diff > changes.diff
skippy-cov --diff changes.diff --coverage-file .coverage
If you omit the --diff
argument, it will default to the main branch as determined by your git remote
(usually "main" or "master").
Advanced:
You may pass any valid git diff refspec to --diff
, including triple-dot syntax (e.g., main...HEAD
or origin/master...feature-branch
). If you provide a triple-dot ref, it will be used as-is, giving you full control over the comparison range.
See skippy-cov --help
for more information.
See CONTRIBUTING.md
for information on how to contribute to the project.
See LICENSE
for licensing information.
FAQs
Selectively run tests based on the current git diff and the collected data from previous tests runs
We found that skippy-cov demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.