Skip to content
Merged
Show file tree
Hide file tree
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
74 changes: 74 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: CI

on:
push:
branches: [main, master]
pull_request:
branches: [main, master]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-action@stable

Comment on lines +20 to +22
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

dtolnay/rust-toolchain GitHub action

💡 Result:

dtolnay/rust-toolchain is a small GitHub Action that installs a Rust toolchain via rustup with concise defaults and one-line usage. Example usage:

  • uses: dtolnay/rust-toolchain@stable
    (or pin to a tag/commit like @1.89.0 or @nightly)

Key details:

  • Inputs: toolchain (e.g. stable, nightly, 1.89.0; default matches the action @rev), targets, components.
  • Outputs: cachekey (short hash of installed rustc), name (rustup's name for the installed toolchain).
  • You can pass an explicit toolchain input (use @master for the action in that case).
  • Useful for workflows that just need a Rust toolchain set up before running cargo commands.

Sources: [1], [2].

Sources
[1] dtolnay/rust-toolchain (GitHub repository README and action.yml).
[2] rust-toolchain (GitHub Marketplace entry).


Replace dtolnay/rust-action@stable with dtolnay/rust-toolchain@stable.

The action dtolnay/rust-action@stable does not exist. The correct action is dtolnay/rust-toolchain@stable.

      - name: Install Rust toolchain
-       uses: dtolnay/rust-action@stable
+       uses: dtolnay/rust-toolchain@stable
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Install Rust toolchain
uses: dtolnay/rust-action@stable
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
🤖 Prompt for AI Agents
.github/workflows/ci.yml lines 20-22: the workflow references a non-existent
action `dtolnay/rust-action@stable`; update the `uses:` entry to
`dtolnay/rust-toolchain@stable` so the workflow uses the correct Rust toolchain
action, and commit the change to the workflow file.

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Run tests
run: cargo test --workspace --all-features

clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-action@stable
with:
components: clippy
Comment on lines +43 to +46
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Same action name issue in clippy job.

🔎 Proposed fix
       - name: Install Rust toolchain
-        uses: dtolnay/rust-action@stable
+        uses: dtolnay/rust-toolchain@stable
         with:
           components: clippy
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Install Rust toolchain
uses: dtolnay/rust-action@stable
with:
components: clippy
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
🤖 Prompt for AI Agents
In .github/workflows/ci.yml around lines 43-46 the step name "Install Rust
toolchain" in the clippy job duplicates another step name; rename this step to a
unique name (e.g., "Install Rust toolchain (clippy)" or "Install Rust toolchain
- clippy job") so the workflow step names are distinct, leaving the
uses/dtolnay/rust-action@stable and with: components: clippy unchanged.


- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Run clippy
run: cargo clippy --workspace --all-features -- -D warnings

fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-action@stable
with:
components: rustfmt
Comment on lines +68 to +71
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

Same action name issue in fmt job.

🔎 Proposed fix
       - name: Install Rust toolchain
-        uses: dtolnay/rust-action@stable
+        uses: dtolnay/rust-toolchain@stable
         with:
           components: rustfmt
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
- name: Install Rust toolchain
uses: dtolnay/rust-action@stable
with:
components: rustfmt
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
🤖 Prompt for AI Agents
In .github/workflows/ci.yml around lines 68 to 71, the step uses the same
top-level "name" value as another step in a different job which causes duplicate
action name confusion; rename this step to a unique, descriptive name (for
example "Install Rust toolchain (fmt job)" or similar) so it differs from the
other job's step name and clearly indicates it belongs to the fmt job.


- name: Check formatting
run: cargo fmt --all -- --check
Loading