Exonum precheck deployment script
Project description
Exonum deployment precheck script
exonum_precheck
is a script which verifies that all the expected checks are OK for code you're about to push.
It is supposed that you'll run this script before every push at the Exonum repository.
This command loads .travis.yml
and performs all the checks (tests and lints) exactly as they will be performed on the CI server.
Also if installed rustc version doesn't match the one in the travis config, a warning will be shown.
Prerequirements
You should have clippy
, rustfmt
, deadlinks
, cspell
and md
installed:
cargo install cargo-deadlinks
rustup component add rustfmt
rustup component add clippy
npm install cspell
npm install md
Example
cd exonum_folder
python3 -m exonum_precheck
Example output (actually it's colored):
Tests results:
Error: cargo test --all
Success: cargo run -p exonum --example explorer
Success: cargo run -p exonum-testkit --example timestamping
Success: cargo run -p exonum-time --example simple_service
Lints results:
Success: npm run cspell
Success: npm run md
Success: cargo clippy --all --benches --features "long_benchmarks"
Success: cargo fmt --all -- --check
Success: cargo clean --doc
Success: cargo doc --no-deps
Success: mkdir -p target/doc/exonum_configuration
Success: mkdir -p target/std/string
Success: touch target/std/string/struct.String.html
Success: touch target/std/primitive.usize.html
Success: touch target/doc/enum.HashTag.html
Success: cargo deadlinks --dir target/doc
Using as a git hook
This script can be also used as a prepush hook:
echo '#!/bin/sh\npython3 -m exonum_precheck || exit 1\n' > ./exonum_folder/.git/hooks/pre-push
chmod +x ./exonum_folder/.git/hooks/pre-push
With that hook you won't be able to push unless all the expected CI checks are passed. However, be careful: if you're going to work on a work-in-progress branch which'll have broken tests, you'll have to temporary remove the hook.
Installing
Install and update using pip:
pip install -U exonum_precheck
LICENSE
Calorizator parser is licensed under the MIT License. See LICENSE for details.
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
Built Distribution
Hashes for exonum_precheck-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1fc858542401a370feec17bfc8f6595cdc4753ee5af169680f58735c2feb590 |
|
MD5 | cba75a60c95e3c78c995ea8f4b1ae798 |
|
BLAKE2b-256 | d7b6f1afa22e461a5f3af4a80367203287223c612b31674784b6741e7a686cf3 |