captains-log/justfile
Drew Galbraith 6bf4a037f3 Have claude update the plan for the backend with the current status. (#5)
Reviewed-on: #5
Co-authored-by: Drew Galbraith <drew@tiramisu.one>
Co-committed-by: Drew Galbraith <drew@tiramisu.one>
2025-09-22 08:00:56 +00:00

53 lines
977 B
Makefile

# Temporary until we have a frontend.
set working-directory := 'backend'
export DATABASE_URL :="sqlite://local.db"
dev:
cargo run
build:
cargo build
test-unit:
cargo test
fmt:
cargo fmt --check
lint:
cargo clippy
clean:
cargo clean
reset-db:
sqlx database drop
sqlx database create
sqlx migrate run
migrate:
sqlx migrate run
migrate-revert:
sqlx migrate revert
test-integration:
#!/usr/bin/env bash
set -e
cargo run &
SERVER_PID=$!
trap 'echo "Stopping server..."; kill -TERM $SERVER_PID 2>/dev/null || true; wait $SERVER_PID 2>/dev/null || true' EXIT
echo "Waiting for server to start..."
printf 'GET http://localhost:3000/health\nHTTP 200' | hurl --retry 30 > /dev/null
echo "Running integration tests..."
hurl --test --error-format long --variable host=http://localhost:3000 tests/api/*.hurl
test-coverage:
cargo tarpaulin --out Html --output-dir coverage