Skip to content

Commit 6c59fab

Browse files
authored
Strengthen local and CI validation (#1)
1 parent 7727501 commit 6c59fab

4 files changed

Lines changed: 71 additions & 6 deletions

File tree

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
## Summary
2+
3+
## Related issues
4+
- Closes #
5+
6+
## Changes
7+
8+
## Testing
9+
- [ ] `just fmt-check`
10+
- [ ] `just check`
11+
- [ ] `just test`
12+
- [ ] Other (please specify):
13+
14+
pro-tip: `just` with no parameters in the root defaults to `just fmt-check`, `just check`, and `just test`.
15+
16+
## Checklist
17+
- [ ] I have updated docs or examples where needed
18+
- [ ] I have added or updated tests where needed
19+
- [ ] I have considered host vs embedded impact
20+
- [ ] I have considered config/logging changes (if applicable)
21+
- [ ] This change is not a breaking change (or I documented it below)
22+
23+
## Breaking changes (if any)
24+
25+
## Additional context

.github/workflows/ci.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,21 @@ env:
1212
CARGO_TERM_COLOR: always
1313

1414
jobs:
15+
fmt:
16+
name: Format Check
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v6
21+
22+
- name: Install Rust
23+
uses: dtolnay/rust-toolchain@stable
24+
with:
25+
components: rustfmt
26+
27+
- name: Check formatting
28+
run: cargo fmt --all -- --check
29+
1530
host:
1631
name: Host Example Checks
1732
runs-on: ubuntu-latest
@@ -38,6 +53,12 @@ jobs:
3853
cargo check -p cu-feetech-demo --all-targets
3954
cargo check -p cu-gnss-ublox-demo --all-targets --features logexport
4055
56+
- name: Run host tests
57+
run: |
58+
cargo test -p cu-human-pose
59+
cargo test -p cu-flight-controller --bin quad-sim --features textlogs
60+
cargo test -p cu-rp-balancebot --bin balancebot-sim
61+
4162
embedded:
4263
name: Embedded Example Checks
4364
runs-on: ubuntu-latest

README.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,17 @@ workflow via GitHub's `workflow_dispatch` API.
3939
## Checks
4040

4141
```bash
42-
just check
42+
just pr-check
4343
```
4444

45-
The host checks cover the Linux-targeted apps. `cu-human-pose` needs GStreamer
46-
development packages installed locally. The embedded smoke checks use
47-
cross-target `cargo check` against the same RP2350 and STM32H7 targets exercised
48-
by these demos.
45+
`just pr-check` runs formatting verification, the existing host/embedded compile
46+
smoke checks, and the host-side unit tests that are stable in CI.
47+
48+
`just check` remains available when you only want the compile-smoke pass. The
49+
host checks cover the Linux-targeted apps. `cu-human-pose` needs GStreamer
50+
development packages installed locally. The embedded smoke checks use cross-target
51+
`cargo check` against the same RP2350 and STM32H7 targets exercised by these
52+
demos.
4953

5054
## License
5155

justfile

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
1-
default: check
1+
default: pr-check
2+
3+
pr-check:
4+
just fmt-check
5+
just check
6+
just test
27

38
fmt:
49
cargo fmt --all
510

11+
fmt-check:
12+
cargo fmt --all -- --check
13+
614
check: check-host check-embedded
715

816
check-host:
@@ -15,3 +23,10 @@ check-host:
1523
check-embedded:
1624
cargo check -p cu-elrs-bdshot-demo --target thumbv8m.main-none-eabihf
1725
cargo check -p cu-flight-controller --target thumbv7em-none-eabihf --no-default-features --features firmware,textlogs --bin quad
26+
27+
# Host-side tests only. The embedded demo is compile-checked separately and the
28+
# balancebot resim/logreader paths pull in local-only or Python-linked flows.
29+
test:
30+
cargo test -p cu-human-pose
31+
cargo test -p cu-flight-controller --bin quad-sim --features textlogs
32+
cargo test -p cu-rp-balancebot --bin balancebot-sim

0 commit comments

Comments
 (0)