Testing
Unit and API tests
gofmt -l . # must print nothing
go vet ./...
go test ./... # unit + API tests against an in-process fake engine
go test -race ./... # needs cgo (CI runs it on Linux)API tests run against internal/engine/enginetest, an in-process fake gRPC engine, so they need no Rust toolchain.
Integration tests
These run against the real engine with its virtual MCU, covering enable, home, jog, move, stop, E-stop, fault injection and reset, engine loss and recovery, the firmware API, and roles:
(cd ../motioncore && cargo build -p motioncore-cli)
MOTIONCORE_BIN=../motioncore/target/debug/motioncore MOTIONCORE_REPO=../motioncore \
go test -tags integration -v ./internal/integration/They live behind the integration build tag, so go test ./... skips them.
Contract check
scripts/check-contract.shVerifies that gen/ matches the engine contract pinned in contract.lock. See Engine contract & codegen.
CI
.github/workflows/ci.yml runs formatting, vet, race tests, the contract check (against a checkout of bzy-logics/motioncore with tags) and the integration tests (against a freshly built engine).
.github/workflows/docs.yml builds this documentation site and deploys it to GitHub Pages.