Description
The validate-ci.sh (2.5KB) and validate-ci.ps1 (3.9KB) scripts provide CI validation, but there is no dedicated .github/workflows/ci.yml or .github/workflows/test.yml workflow file. The sanity_check.sh (5.3KB) script performs sanity checks but isn't automated in CI. The tarpaulin.toml (418 bytes) configures code coverage but coverage reporting is not enforced as a PR gate.
CI gaps:
- No GitHub Actions workflow for automated testing on PRs
- No code coverage enforcement in CI
- No WASM build verification step
- No lint/clippy check in CI
- No fuzz test automation
- No contract size regression check
- No vulnerability scanning (cargo-audit)
- No multi-platform build matrix (Linux, macOS, Windows)
Technical Context & Impact
- Affected Components/Files:
.github/workflows/ (missing), validate-ci.sh, validate-ci.ps1, sanity_check.sh, tarpaulin.toml
- Impact: Development Workflow, Code Quality, Regression Prevention
Step-by-Step Implementation Guide
- Create
.github/workflows/ci.yml with jobs:
test: cargo test --all-packages on ubuntu-latest, macOS-latest
lint: cargo clippy --all-targets -- -D warnings
coverage: cargo tarpaulin --out Xml --fail-under 70
wasm-build: cargo build --target wasm32-unknown-unknown --release
security-audit: cargo audit
contract-size: Check WASM filesize < 200KB
- Add PR gate: All CI jobs must pass; coverage diff annotated on PRs
- Create
.github/workflows/fuzz.yml: Run cargo fuzz run fuzz_target_1 -- -max_total_time=300 nightly
- Add
.github/workflows/release.yml: Build, sign, and deploy WASM artifacts on tag push
- Integrate sanity_check.sh: Convert key checks into CI test steps
- Add
.github/dependabot.yml for automated dependency updates
- Create
.github/CODEOWNERS for automatic PR reviewer assignment
Verification & Testing Steps
- Push CI workflow to a branch and verify GitHub Actions runs successfully
- Force a test failure and verify PR is blocked
- Check coverage report is generated and exceeds threshold
- Verify WASM build produces valid
.wasm file under size limit
- Test fuzz workflow on schedule trigger
- Verify dependabot creates PRs for dependency updates
Description
The
validate-ci.sh(2.5KB) andvalidate-ci.ps1(3.9KB) scripts provide CI validation, but there is no dedicated.github/workflows/ci.ymlor.github/workflows/test.ymlworkflow file. Thesanity_check.sh(5.3KB) script performs sanity checks but isn't automated in CI. Thetarpaulin.toml(418 bytes) configures code coverage but coverage reporting is not enforced as a PR gate.CI gaps:
Technical Context & Impact
.github/workflows/(missing),validate-ci.sh,validate-ci.ps1,sanity_check.sh,tarpaulin.tomlStep-by-Step Implementation Guide
.github/workflows/ci.ymlwith jobs:test:cargo test --all-packageson ubuntu-latest, macOS-latestlint:cargo clippy --all-targets -- -D warningscoverage:cargo tarpaulin --out Xml --fail-under 70wasm-build:cargo build --target wasm32-unknown-unknown --releasesecurity-audit:cargo auditcontract-size: Check WASM filesize < 200KB.github/workflows/fuzz.yml: Runcargo fuzz run fuzz_target_1 -- -max_total_time=300nightly.github/workflows/release.yml: Build, sign, and deploy WASM artifacts on tag push.github/dependabot.ymlfor automated dependency updates.github/CODEOWNERSfor automatic PR reviewer assignmentVerification & Testing Steps
.wasmfile under size limit