You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chore(lambda-rs): Increase code coverage for rendering (#177)
## Summary
Increase `lambda-rs` render module test coverage by
adding adapter-backed GPU tests, a feature-gated window/surface smoke
runner for
coverage, and a small render refactor to support offscreen-only
rendering paths.
## Related Issues
## Changes
- Add comprehensive tests across `crates/lambda-rs/src/render/**` to
exercise
pipeline/pass/bind-group/buffer/encoder/targets/texture/validation
paths.
- Update GPU-dependent tests to run automatically when an adapter is
available:
attempt primary adapter first, then wgpu fallback/virtual adapter;
optionally
enforce adapter presence via `LAMBDA_REQUIRE_GPU_ADAPTER=1`.
- Centralize GPU creation logic for tests in a single helper
implementation.
- Add rustdoc on all render tests describing what each test validates.
- Update CI workflows to enforce adapter-backed tests on Linux Vulkan
jobs (Mesa
lavapipe) by setting `LAMBDA_REQUIRE_GPU_ADAPTER=1`.
- Ignore generated coverage artifacts in `.gitignore`.
- Flatten docs paths for specs/tutorials (remove nested area folders),
update
indices/links, and remove outdated template guidance.
## Type of Change
- [ ] Bug fix (non-breaking change that fixes an issue)
- [x] Feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [x] Documentation (updates to docs, specs, tutorials, or comments)
- [x] Refactor (code change that neither fixes a bug nor adds a feature)
- [ ] Performance (change that improves performance)
- [x] Test (adding or updating tests)
- [x] Build/CI (changes to build process or CI configuration)
## Affected Crates
- [x] `lambda-rs`
- [ ] `lambda-rs-platform`
- [ ] `lambda-rs-args`
- [ ] `lambda-rs-logging`
- [ ] Other:
## Checklist
- [x] Code follows the repository style guidelines (`cargo +nightly fmt
--all`)
- [ ] Code passes clippy (`cargo clippy --workspace --all-targets -- -D
warnings`)
- [ ] Tests pass (`cargo test --workspace`)
- [x] New code includes appropriate documentation
- [ ] Public API changes are documented
- [ ] Breaking changes are noted in this PR description
## Testing
**Commands run:**
```bash
cargo +nightly fmt
cargo test -p lambda-rs --lib --tests
```
**Coverage workflow used for adapter-backed + window/surface coverage:**
```bash
cargo llvm-cov clean -p lambda-rs
cargo llvm-cov -p lambda-rs --lib --tests --no-report -- --include-ignored
cargo llvm-cov report -p lambda-rs --json --output-path coverage/lambda_rs_cov.json
```
**Manual verification steps (if applicable):**
1. Confirm render folder per-file line coverage is ≥80% in
`coverage/lambda_rs_cov.json`.
## Screenshots/Recordings
N/A (no UI changes).
## Platform Testing
- [x] macOS
- [ ] Windows
- [ ] Linux
## Additional Notes
- Linux CI is configured to prefer Mesa's Vulkan software implementation
(lavapipe) and now enforces adapter-backed render tests via
`LAMBDA_REQUIRE_GPU_ADAPTER=1`.
0 commit comments