chore: migrate rust/unit_testable_rust_canister to icp-cli#1405
Draft
marc0olo wants to merge 5 commits into
Draft
chore: migrate rust/unit_testable_rust_canister to icp-cli#1405marc0olo wants to merge 5 commits into
marc0olo wants to merge 5 commits into
Conversation
- Replace dfx.json with icp.yaml using @dfinity/rust@v3.3.0 recipe - Move src/hello_canister/ to backend/, rename package to "backend" - Rename hello_canister.did to backend/backend.did - Update lib.rs candid_interface_compatibility test to reference backend.did - Update integration_tests.rs to use backend crate and backend.wasm paths - Add Makefile with test target exercising all public canister endpoints - Add CI workflow with cargo test --lib step plus icp deploy + make test - Delete old dfx-based CI workflow rust-unit-testable-rust-canister-example.yml - Update README with icp-cli deploy instructions, preserve architecture docs Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…CI image to 1.0.1 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
8f8221f to
bf60780
Compare
…ion tests in CI - Update pocket-ic from 9.0.2 to 14.0.0 (API is compatible, no code changes needed) - Add PocketIC integration test step to CI using dfinity/pocketic action - README documents how to install PocketIC server and run integration tests locally Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…egration tests The integration tests try to load the WASM at runtime but the in-test rebuild logic fails in CI due to working directory differences. Explicitly build the WASM first (same pattern as guards PR 1396). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…n example, not a branch The candid-type-generation branch no longer exists as such — the content is now the rust/candid_type_generation example in this repo. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates
rust/unit_testable_rust_canisterfrom dfx to icp-cli.Removed:
dfx.json,BUILD.md,.devcontainer/, old dfx-based CI workflowChanged:
src/hello_canister/tobackend/; package renamed tobackendhello_canister.did→backend/backend.did; Candid compatibility test and integration test WASM path updated accordinglypocket-icupdated from9.0.2to14.0.0Added:
icp.yamlwith@dfinity/rust@v3.3.0recipetest.shwith 5 tests covering all public endpointscargo test --lib), PocketIC integration tests (cargo test --test integration_tests) using thedfinity/pocketicaction, and icp-cli deploy +bash test.shTest plan
cargo test --libpasses (unit tests)cargo test --test integration_testspasses (PocketIC integration tests, requires PocketIC server)icp network start -d && icp deploy && bash test.shpasses🤖 Generated with Claude Code