Repository navigation
docs: record the local-vs-CI split so local runs stop duplicating CI #899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,34 @@ Test locations: | |
|
|
||
| Driving the actual compiled binary through a real display — for flows that need real navigation, real async/network timing, or visual verification beyond what `kittest` (no display) or `backend-e2e` (no UI) can cover. Read `docs/gui-testing/README.md` before running this kind of test — it has the safety rules (isolated data dir, credential handling, fund-movement caps) and the reusable scenario library under `docs/gui-testing/scenarios/`. | ||
|
|
||
| Always run `cargo clippy` and `cargo +nightly fmt` when finalizing your work. | ||
| Always run `cargo +nightly fmt` when finalizing your work. For `cargo clippy`, see the scope guidance below. | ||
|
|
||
| ### Local vs CI — avoid duplicate test runs | ||
|
|
||
| CI is the full-suite backstop. Do not reproduce it locally. | ||
|
|
||
| On every **non-draft** PR that touches Rust code, and on pushes to `v*-dev`, GitHub Actions runs the complete gate: | ||
|
|
||
| | Workflow | Runs | | ||
| |---|---| | ||
| | `tests.yml` | `cargo test --all-features --workspace` and `cargo test --doc --all-features --workspace` | | ||
| | `clippy.yml` | `cargo fmt --all -- --check` and `cargo clippy --all-features --all-targets -- -D warnings` | | ||
|
|
||
| The workflows are path-filtered independently, each on `**/*.rs` (which includes `build.rs`), `**/Cargo.toml`, `Cargo.lock`, `.cargo/config.toml`, and its own workflow file. `tests.yml` additionally watches `tests/backend-e2e/**`, so a documentation-only change under that directory (e.g. `tests/backend-e2e/README.md`) still triggers the test workflow; other documentation-only changes run neither workflow. | ||
|
|
||
| Because CI always runs the full sweep, locally you should: | ||
|
|
||
| - Run only the **narrowest scope covering your change** — `cargo test <test_name> --all-features`, or `cargo test --test kittest --all-features` for a UI change. Running the whole workspace suite locally only duplicates the run CI is about to do anyway. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Low: new "run bare cargo locally" guidance doesn't disambiguate from the CLAUDE.md's existing "CI: Safe Cargo Wrapper" section mandates Suggest: one clause cross-referencing the safe-cargo.sh rule so the two sections can't be read as conflicting for an agent running inside that workflow. 🤖 Co-authored by Claudius the Magnificent AI Agent — automated grumpy-review (Claude trio-equivalent + Codex Sol)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 🤖 Co-authored by Claudius the Magnificent AI Agent |
||
| - Always run `cargo +nightly fmt --all` before committing. It needs no compile, and `clippy.yml` fails the build on unformatted code. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟡 Medium: documented local formatter doesn't match CI's formatter toolchain This mandates Suggest: 🤖 Co-authored by Claudius the Magnificent AI Agent — automated grumpy-review (Claude trio-equivalent + Codex Sol)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 🤖 Co-authored by Claudius the Magnificent AI Agent |
||
| - Run `cargo clippy` locally only for the scope you touched (`-p <crate>`), or when you expect lint fallout. CI owns the `--all-features --all-targets` sweep. | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🟢 Low: This repo has no Suggest: replace with something that actually narrows a clippy run in a single-package repo (e.g. 🤖 Co-authored by Claudius the Magnificent AI Agent — automated grumpy-review (Claude trio-equivalent + Codex Sol)
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 🤖 Co-authored by Claudius the Magnificent AI Agent |
||
| - After pushing, watch the PR checks instead of re-running the suite locally. | ||
|
|
||
| Two gaps where CI will **not** cover you: | ||
|
|
||
| - **Draft PRs run no automatic CI.** Both workflows are gated on `github.event.pull_request.draft != true`, so a draft PR's `pull_request` runs are suppressed. Neither workflow declares a `workflow_dispatch` trigger, so there is no way to run them by hand against a draft branch — mark the PR ready for review (`ready_for_review` triggers the full run) to get CI coverage. | ||
| - **Backend E2E tests are not in CI.** The step is commented out in `tests.yml`, and the tests are `#[ignore]`d. If a change touches backend behaviour that only `tests/backend-e2e/` covers, run those locally; CI will not. | ||
|
|
||
| A green CI run is only meaningful if it actually executed your tests. `cargo test <filter>` exits 0 and prints `test result: ok` even when the filter matches nothing — when checking a run, confirm your new test names appear in the log rather than trusting the exit code. | ||
|
|
||
| ### User stories catalog | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🟢 Low: "complete gate"/"full sweep" wording overlooks intentionally-
#[ignore]d unit testsThe default
cargo test --all-features --workspaceskips every#[ignore]test. Beyond the acknowledged backend-E2E lane, current HEAD also has at least one intentionally-ignored unit test (src/model/secret.rs:492,test_drop_zeroes_full_capacity) that stays manual. "Complete gate" / "full sweep," plus the advice to check for a test's name in the log, reads as too absolute — a test name can appear in the log withignoredstatus without having actually run.Suggest: qualify to "the full non-ignored suite," note intentionally-ignored tests remain manual, and recommend checking per-test pass/ignore status (or executed-test count) rather than only searching the log for a name.
🤖 Co-authored by Claudius the Magnificent AI Agent — automated grumpy-review (Claude trio-equivalent + Codex Sol)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in
48e3c980— qualified to "full non-ignored-test gate," and the log-check guidance now calls out a concrete example (test_drop_zeroes_full_capacityinsrc/model/secret.rs) and says to confirm pass status, not just name presence.🤖 Co-authored by Claudius the Magnificent AI Agent