Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .circleci/ci_cargo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
version: 2.1

jobs:
build-and-test:
docker:
- image: cimg/rust:1.88.0
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

The Rust version in the Docker image (1.88.0) does not match the rust-version specified in Cargo.toml (1.86). To ensure consistency between the development environment and CI, it's recommended to use the same Rust version.

      - image: cimg/rust:1.86.0

steps:
- checkout
- restore_cache:
keys:
- v1-cargo-{{ checksum "Cargo.lock" }}
- v1-cargo-
- run:
name: "Check formatting"
command: cargo fmt -- --check
- run:
name: "Run tests"
command: cargo test
- save_cache:
key: v1-cargo-{{ checksum "Cargo.lock" }}
paths:
- "~/.cargo/bin"
- "~/.cargo/registry/index"
- "~/.cargo/registry/cache"
- "~/.cargo/git/db"
- "target"
- run:
name: "Check formatting"
command: cargo fmt -- --check
- run:
name: "Run tests"
command: cargo test
Comment on lines +27 to +32
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

high

These steps for checking formatting and running tests are duplicates of the steps on lines 13-18. This is redundant and makes the CI job take longer than necessary. These duplicated steps should be removed.


workflows:
ci:
jobs:
- build-and-test