# mcp-web task runner.
#
# Most recipes come from the psa-systems/common task runner, vendored as the
# `common` git submodule and imported below. After cloning run
# `git submodule update --init` so the import resolves; to pull a newer common,
# update the submodule and commit the new gitlink.
#
# mcp-web is a single-package library crate (no binary, no runtime image), so it
# keeps common's default `generic` release layout (release_manifest = Cargo.toml)
# and overrides only what a library needs to diverge on: `check` drops the
# runtime-image build, and pre-commit runs in the shared rust-builder image
# rather than a compose `app` service this repo does not have.

set allow-duplicate-recipes := true

import 'common/common.just'

# Drives cargo cache volume names and image tags in the inherited recipes.
app := "mcp-web"

# No compose.dev.yml here (library crate), so run the CI checks in the shared
# rust-builder image, matching youtrack-cli's toolchain exactly.
pre_commit_mode := "docker"
dev_image := "ghcr.io/niceguyit/rust-builder-musl:v1.0.0-rust1.94-alpine"

# CI runs `cargo test --all-targets`; match it (common defaults to `--bins`).
test_args := "--all-targets"

# -- Checks (override) --------------------------------------------------------

# A library crate produces no runtime OCI image, so `check` is fmt + clippy +
# build only. Overrides common's `check`, which appends `check-docker`.
[group: 'check']
check: check-fmt check-clippy check-build

# Run the test suite (matches CI's cargo test --all-targets).
[group: 'check']
test:
    cargo test --all-targets
