In PHP
A Laravel course that ships code samples needs more than green unit tests on the LMS. The examples themselves have to compile. This site treats the Rust fences the same way: CI runs them.
In Rust
Four jobs watch the course:
- snippets —
scripts/check-snippets.pywalks every lesson markdown file. Fences markedrustwith afn mainmust build and run. Fences markedcompile_fail=E0xxxmust fail with that error code. Unmarked fragments are listed in a report so they can be labelled over time. - crates — the companion repo runs
cargo fmt,clippy -D warnings, andcargo test --workspace, with Postgres 16 for the shop-api sqlx tests. - wasm —
shop-pricingandshop-frontbuild forwasm32-unknown-unknown, plus their native unit tests. - site — the Laravel app installs, builds the frontend, and dry-runs
course:refreshso internal course links stay valid.
You do not need to run those jobs to learn. When something in a lesson disagrees with rustc, open an issue: the fence should fail CI until it matches the compiler.
Key takeaways
- Runnable fences and intentional
compile_failfences are checked in CI. - The companion workspace and the WASM crates are tested on every push.
- The site build plus a course dry-run catches broken internal links.