From 5e134c223d203085d6373da993a941deda2d9c6c Mon Sep 17 00:00:00 2001 From: Brandon Geraci Date: Wed, 18 Feb 2026 18:24:50 -0600 Subject: [PATCH] chore: add testing infrastructure and test plan --- .github/CODEOWNERS | 1 + .github/PULL_REQUEST_TEMPLATE.md | 9 +++++++ docs/TEST_PLAN.md | 43 ++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 docs/TEST_PLAN.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..9991e10 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @artifact-keeper/plugins diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..7ab7660 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,9 @@ +## Summary + + +## Test Checklist +- [ ] `cargo check` passes +- [ ] `cargo test` passes on host target +- [ ] `cargo build --release` produces valid WASM +- [ ] Manually tested plugin loading (if applicable) +- [ ] No regressions in existing tests diff --git a/docs/TEST_PLAN.md b/docs/TEST_PLAN.md new file mode 100644 index 0000000..f1c2f3f --- /dev/null +++ b/docs/TEST_PLAN.md @@ -0,0 +1,43 @@ +# WASM Plugin Test Plan + +## Overview + +The artifact-keeper example plugin is a Rust WASM plugin template using wit-bindgen. It compiles to wasm32-wasip1 and implements the FormatHandler WIT contract. + +## Test Inventory + +| Test Type | Framework | Count | CI Job | Status | +|-----------|-----------|-------|--------|--------| +| Check | cargo check | Full | `check` | Active | +| Format | cargo fmt | Full | CI | Active | +| Lint | cargo clippy | Full | CI | Active | +| Unit | cargo test | Minimal | `test` | Active | +| WASM build | cargo build --release | Full | `build` | Active | +| Integration | (none) | 0 | - | Missing | + +## How to Run + +### Check and Lint +```bash +cargo check --workspace +cargo fmt --check +cargo clippy --workspace -- -D warnings +``` + +### Unit Tests (must run on host, not WASM target) +```bash +cargo test --target $(rustc -vV | grep host | awk '{print $2}') +``` + +### Build WASM +```bash +cargo build --release +# Output: target/wasm32-wasip1/release/unity_format_plugin.wasm +``` + +## Gaps and Roadmap + +| Gap | Recommendation | Priority | +|-----|---------------|----------| +| No integration test | Add test that loads WASM in wasmtime and calls FormatHandler methods | P2 | +| No plugin lifecycle test | Test register, upload, download, list cycle | P3 |