Skip to content

ci: modernize GitHub Actions workflows#389

Open
KuaaMU wants to merge 1 commit into
dswd:masterfrom
KuaaMU:ci/modernize-workflows
Open

ci: modernize GitHub Actions workflows#389
KuaaMU wants to merge 1 commit into
dswd:masterfrom
KuaaMU:ci/modernize-workflows

Conversation

@KuaaMU
Copy link
Copy Markdown

@KuaaMU KuaaMU commented Apr 30, 2026

Summary

Modernizes the CI configuration by replacing deprecated GitHub Actions with actively maintained alternatives.

Changes

.github/workflows/check.yml:

  • Updated actions/checkout@v2v4
  • Replaced deprecated actions-rs/toolchain@v1 with dtolnay/rust-toolchain@stable
  • Replaced deprecated actions-rs/cargo@v1 with direct cargo commands
  • Added pull_request trigger (CI now runs on PRs to master)
  • Added Swatinem/rust-cache@v2 for dependency caching (faster builds)
  • Added Clippy lint job: cargo clippy --all-targets --all-features -- -D warnings
  • Added Format check job: cargo fmt --all -- --check

.github/workflows/audit.yml:

  • Updated actions/checkout@v2v4
  • Replaced deprecated actions-rs/audit-check@v1 with rustsec/audit-check@v2.0.0
  • Added push and pull_request triggers on Cargo file changes

Why

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 check passes ✅
  • cargo test passes (71 passed, 6 ignored, 0 failed) ✅
  • Only CI workflow files are modified, no functional code changes
  • All existing CI functionality (check, test, audit) is preserved

- 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.
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.

1 participant