OpenClawKit uses Swift Testing (import Testing) for both unit and E2E coverage.
swift testTests/OpenClawKitTests- unit-level tests for protocol, core shims, runtime primitives, diagnostics, facade helpers
Tests/OpenClawKitE2ETests- end-to-end tests across transport/runtime/channels/plugin flow and reconnect lifecycle
Tests/OpenClawLinuxRuntimeTests- Linux-focused runtime, provider, gateway, and channel regressions exercised in CI and Docker
Run this before committing networking changes:
Scripts/check-networking-concurrency.shThis enforces strict concurrency diagnostics for networking-related targets.
Some integration-style E2E workflows may require provider keys:
OPENAI_API_KEYGEMINI_API_KEYANTHROPIC_API_KEYXAI_API_KEY
Set these in local .env (ignored by git) when running live provider-backed scenarios.
Never commit .env.
swift build -Xswiftc -warnings-as-errorsScripts/lint-swift.shScripts/check-networking-concurrency.shswift testScripts/build-docs-site.sh./Scripts/build-ios-example.sh./Scripts/test-ios-example.sh./Scripts/build-tvos-example.shScripts/validate-apple-matrix.sh --platform macosScripts/validate-apple-matrix.sh --platform ios
The repo CI runs the Linux runtime gate on Ubuntu. To catch Linux-only failures before pushing, run the same scripts in Docker:
docker run --rm -v "$PWD:/workspace" -w /workspace swift:6.2 Scripts/build-linux-runtime.sh
docker run --rm -v "$PWD:/workspace" -w /workspace swift:6.2 Scripts/check-networking-concurrency.sh
docker run --rm -v "$PWD:/workspace" -w /workspace swift:6.2 Scripts/test-linux-runtime.shThe public docs site is generated with Swift-DocC on macOS.
Scripts/build-docs-site.shThe script fails if the static site does not contain index.html and the
documentation/openclawkit entry point expected by GitHub Pages.