git-next/justfile
Paul Campbell 681d85aac1
All checks were successful
Rust / build (push) Successful in 6m9s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful
Release Please / Release-plz (push) Successful in 1m50s
chore: remove manual crates.io publish recipe from justfile
2024-09-14 12:22:29 +01:00

57 lines
1.6 KiB
Makefile

install-hooks:
@echo "Installing git hooks"
cargo install cc-cli
git config core.hooksPath .git-hooks
validate-dev-branch:
git rebase -i origin/main -x 'just mock-ci'
mock-ci:
cargo fmt --check
cargo hack --feature-powerset build
cargo hack --feature-powerset test
cargo hack --feature-powerset clippy
start-ngrok:
#!/usr/bin/env bash
# Uses NGROK_DOMAIN env var if available
if test -z ${NGROK_DOMAIN} ; then
ngrok http 8080
else
ngrok http --domain=${NGROK_DOMAIN} 8080
fi
start-mac-tunnel:
ssh dagon -R7777:localhost:8888
@echo "Mac Tunnel has closed"
coverage-update:
cargo tarpaulin --lib --out html
echo "Now:\n\topen tarpaulin-report.html"
coverage crate test:
cargo tarpaulin -p {{crate}} --lib --out html -- {{test}}
# cargo tarpaulin --skip-clean -p {{crate}} --lib --out html -- {{test}}
grcov-coverage:
#!/usr/bin/env bash
set -e
# an alternate coverage report
rustup component add llvm-tools-preview
export RUSTFLAGS="-Cinstrument-coverage"
cargo build
export LLVM_PROFILE_FILE="git-next-%p-%m.profraw"
cargo test
echo "Building report..."
grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/
find . -name '*.profraw' -exec rm "{}" \;
echo "Now:\n\topen target/debug/coverage/index.html"
docker-build-builder:
docker build -t git.kemitix.net/kemitix/git-next-builder:2024.08.04 -f Dockerfile.builder .
docker-build: docker-build-builder
docker build -t git.kemitix.net/kemitix/git-next:latest .
docker-run: docker-build
docker run -it -p "7777:8888" -v .:/app/ git.kemitix.net/kemitix/git-next:latest server start --ui