Skip to content

[CI] Run Cargo Test and Cargo fmt#16

Merged
WGB5445 merged 8 commits intomainfrom
logan/test-ci
Sep 24, 2025
Merged

[CI] Run Cargo Test and Cargo fmt#16
WGB5445 merged 8 commits intomainfrom
logan/test-ci

Conversation

@WGB5445
Copy link
Contributor

@WGB5445 WGB5445 commented Sep 24, 2025

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds CI workflow to run Cargo tests and formatting checks, with related code cleanup to ensure tests pass properly.

  • Adds GitHub Actions workflow with format checking, testing, and building
  • Fixes example binary path and removes unused imports
  • Adds network test skipping mechanism for CI environment

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
.github/workflows/ci.yml New CI workflow with format, test, and build jobs
crates/examples/Cargo.toml Corrects binary path for view_function_example
crates/aptos-rust-sdk/src/tests/client/rest_api.rs Adds network test skip guards
crates/aptos-rust-sdk/src/client/rest_api.rs Adds network test skip guards and removes unused import
crates/aptos-rust-sdk-types/src/api_types/move_types.rs Removes unused anyhow import
crates/aptos-crypto/src/unit_tests/bcs_test.rs Formats long lines for readability
crates/aptos-crypto/src/encoding_type.rs Formats long line for readability
crates/aptos-crypto-derive/src/lib.rs Removes unused forbid unsafe_code attribute

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment on lines +24 to +25
- name: Add rustfmt component
run: rustup component add rustfmt
Copy link

Copilot AI Sep 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rustfmt component is already being installed via the rust-toolchain action on line 22. This redundant step can be removed.

Suggested change
- name: Add rustfmt component
run: rustup component add rustfmt

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, it is adding rustfmt and you don't need it, but it's pretty minor

Copy link

@0x-j 0x-j left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good, just need to address the comment from copilot

Comment on lines +24 to +25
- name: Add rustfmt component
run: rustup component add rustfmt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, it is adding rustfmt and you don't need it, but it's pretty minor

@WGB5445
Copy link
Contributor Author

WGB5445 commented Sep 24, 2025

Let me give it a try. I remember that previously it would fail if I didn’t have it installed. I’ll test it now, please give me a moment. If there are any issues, I’ll revert the change.

@WGB5445 WGB5445 merged commit 55abce9 into main Sep 24, 2025
3 checks passed
@WGB5445 WGB5445 deleted the logan/test-ci branch September 24, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants