ci: modernize GitHub Actions workflows#389
Open
KuaaMU wants to merge 1 commit into
Open
Conversation
- Update actions/checkout@v2 → v4 - Replace actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable - Replace actions-rs/cargo@v1 with direct cargo commands - Replace actions-rs/audit-check@v1 with rustsec/audit-check@v2 - Add pull_request trigger to check.yml - Add push/pull_request triggers to audit.yml on Cargo file changes - Add Swatinem/rust-cache@v2 for faster builds - Add clippy lint job (cargo clippy --all-targets --all-features -- -D warnings) - Add format check job (cargo fmt --all -- --check) The deprecated actions-rs/* actions are no longer maintained and use outdated Node.js runtimes. This brings the CI configuration up to date with current best practices while preserving all existing functionality.
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
Modernizes the CI configuration by replacing deprecated GitHub Actions with actively maintained alternatives.
Changes
.github/workflows/check.yml:actions/checkout@v2→v4actions-rs/toolchain@v1withdtolnay/rust-toolchain@stableactions-rs/cargo@v1with directcargocommandspull_requesttrigger (CI now runs on PRs to master)Swatinem/rust-cache@v2for dependency caching (faster builds)cargo clippy --all-targets --all-features -- -D warningscargo fmt --all -- --check.github/workflows/audit.yml:actions/checkout@v2→v4actions-rs/audit-check@v1withrustsec/audit-check@v2.0.0pushandpull_requesttriggers on Cargo file changesWhy
The
actions-rs/*actions (toolchain, cargo, audit-check) are no longer actively maintained and use outdated Node.js runtimes (GitHub has deprecated Node 12/16). This migration uses the de facto standard replacements used by most Rust projects.Verification
cargo checkpasses ✅cargo testpasses (71 passed, 6 ignored, 0 failed) ✅