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.

Source Distribution

local_ci_hooks-0.1.1.2.tar.gz (2.8 kB view details)

Uploaded Source

File details

Details for the file local_ci_hooks-0.1.1.2.tar.gz.

File metadata

  • Download URL: local_ci_hooks-0.1.1.2.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0.post20201221 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.6.9

File hashes

Hashes for local_ci_hooks-0.1.1.2.tar.gz
Algorithm Hash digest
SHA256 6a05ba477b82ee687f6c633ad4cebc49a1666f35e02c97b6bf39fa94b26c37b7
MD5 b1a8969db472c86ff73331253c0c8641
BLAKE2b-256 fcc15433aeb8f0001e50f753c82d119c0683ece0ce354af8c6eb4f236c167784

See more details on using hashes here.

Supported by

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