Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,66 @@ jobs:
run: |
find . -name SKILL.md -not -path './.git/*' -print0 \
| xargs -0 python3 .githooks/check-description-length.py

# construct-cli/ is the one real build surface in this repo — everything else
# is markdown. It went ungated until now, which is how a clippy break
# (items_after_test_module in src/sources/skillmd.rs) sat unnoticed on main:
# the lint job above never invokes cargo.
#
# Deliberately not path-filtered. A filtered job reports nothing at all when
# it is skipped, which makes it unusable as a required status check; the
# cache makes a markdown-only PR cheap enough that always running is the
# better trade.
cargo:
name: construct-cli — fmt + clippy + test
runs-on: ubuntu-latest
defaults:
run:
working-directory: construct-cli
steps:
- uses: actions/checkout@v4

# Stable, not the declared MSRV: clippy lints and rustfmt output drift
# between versions, so pinning the gate to the MSRV would freeze both. See
# the msrv job below for the compatibility check.
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt

- uses: Swatinem/rust-cache@v2
with:
workspaces: construct-cli

- name: Format
run: cargo fmt --check

# -D warnings matches construct-cli/CLAUDE.md; a warning is a failure.
- name: Clippy
run: cargo clippy --all-targets -- -D warnings

- name: Test
run: cargo test

# Separate from the gate above so an MSRV bump is a visible, deliberate
# change rather than something that silently rides along with a dependency
# update. Keep the version in step with `rust-version` in Cargo.toml.
msrv:
name: construct-cli — MSRV (1.88)
runs-on: ubuntu-latest
defaults:
run:
working-directory: construct-cli
steps:
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@1.88.0

- uses: Swatinem/rust-cache@v2
with:
workspaces: construct-cli
key: msrv

# `check`, not `test`: dev-dependencies are not bound by the MSRV the
# crate advertises to consumers.
- name: Check against the declared MSRV
run: cargo check --all-features
9 changes: 9 additions & 0 deletions construct-cli/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ cargo audit
nix build .#construct && ./result/bin/construct --version
```

`cargo fmt --check`, `cargo clippy --all-targets -- -D warnings`, and
`cargo test` are gated in CI by the **`cargo`** job in
`.github/workflows/ci.yml`, and a separate **`msrv`** job runs `cargo check`
against the `rust-version` declared in `Cargo.toml` (1.88). The gate runs on
stable, so a clippy or rustfmt change can turn a green PR red — fix the finding
rather than pinning the toolchain. `cargo audit` is **not** in CI: a new
advisory would redden `main` for a reason unrelated to the change under review,
so run it locally before adding a dependency (Standard §3.3).

## Architecture

- `main.rs` is thin: parse → build `Context` → `commands::dispatch` → render.
Expand Down
10 changes: 9 additions & 1 deletion construct-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@
name = "construct"
version = "0.1.0"
edition = "2021"
rust-version = "1.82"
# The real floor, measured by CI's `msrv` job rather than asserted. It is set
# by the locked dependency tree, not by this crate's own source: darling 0.23
# and instability 0.3.12 (transitive, via ratatui) both require 1.88, and
# indexmap 2.14 needs the `edition2024` Cargo feature from 1.85. The value that
# stood here before (1.82) could not even parse the tree.
#
# Raise or lower this only alongside a green `msrv` run — cargo's resolver
# reports the exact offending packages, so re-measure rather than guess.
rust-version = "1.88"
description = "Spacecraft Software Construct skills package manager (CLI + TUI)"
homepage = "https://Construct.SpacecraftSoftware.org/"
repository = "https://github.com/Spacecraft-Software/Construct"
Expand Down
Loading