Skip to main content

Install a Local CI engine

Project description

Local CI Hooks

This script adds Git hooks to your repository to run the tests automatically while pushing commits to your remotes. The idea is to avoid pushing broken code to your remotes, automatising the process of verification.

Installation

pip install local_ci_hooks

Usage

Run the script in a repository:

local_ci_hooks --install

This will install the pre-push hook for you. Also, it will create a file named .local_ci.sh with a dummy test. You can set your test commands in this file.

To uninstall the hook:

local_ci_hooks --uninstall

Example scripts

For modifying the CI, please, take into consideration the following .local_ci.sh example files.

NodeJS:

#!/bin/bash
npm install || exit 1
npm run test || exit 1
exit 0

Python:

#!/bin/bash
pip install --prefix ./build . || exit 1
export PATH="./build/bin:$PATH"
export LD_LIBARY_PATH="./build/lib:$LD_LIBRARY_PATH"
pytest . || exit 1
pip uninstall <your project>
exit 0

Version: 0.1.1

Project details


Download files

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

Files for local-ci-hooks, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size local_ci_hooks-0.1.1.2.tar.gz (2.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page