Skip to content

add github actions workflows#6

Merged
denversc merged 12 commits intodevfrom
gha
Apr 5, 2026
Merged

add github actions workflows#6
denversc merged 12 commits intodevfrom
gha

Conversation

@denversc
Copy link
Copy Markdown
Owner

@denversc denversc commented Apr 5, 2026

This PR introduces GitHub Actions workflows for continuous integration and lints the workflows themselves. It also includes a minor refactor to the TUI input handling to resolve Clippy warnings.

Highlights

  • CI Workflows: Added a rust.yml workflow to perform builds, tests, formatting checks, and Clippy linting on every pull request.
  • Workflow Linting: Introduced actionlint.yml and ratchet.yml to ensure GitHub Actions workflows follow best practices and have their action versions pinned to specific SHAs.
  • TUI Refactor: Refactored the event loop in rutt-tui/src/main.rs to address clippy::collapsible_if warnings by using if let chains.
  • Action Pinning: All GitHub Actions used in the workflows are now pinned to specific SHAs for improved security and reproducibility.

Changelog

4 files affected
  • actionlint.yml: Added workflow to lint GitHub Actions.
  • ratchet.yml: Added workflow to ensure action versions are pinned to SHAs.
  • rust.yml: Added workflow for Rust CI (build, test, fmt, clippy).
  • main.rs: Refactored input handling to fix Clippy warnings.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the event polling logic in main.rs by flattening nested if statements using the let_chains feature. Feedback indicates that let_chains is an unstable Rust feature that will cause compilation errors on the stable toolchain, so the code should be reverted to nested if let blocks. Additionally, the indentation and closing braces need to be adjusted to maintain compatibility and correct block structure.

Comment thread rutt-tui/src/main.rs Outdated
Comment thread rutt-tui/src/main.rs
denversc added 8 commits April 5, 2026 00:55
…ings

- Add GitHub Actions workflow for build, test, format, and lint
- Use ratchet to pin action versions by SHA
- Fix clippy::collapsible_if warnings in rutt-tui/src/main.rs
Ensures all GitHub Actions in .github/workflows/ are pinned to specific SHAs.
Validates syntax, expressions, and best practices for all YAML workflows.
@denversc
Copy link
Copy Markdown
Owner Author

denversc commented Apr 5, 2026

/gemini review

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request refactors the event handling loop in rutt-tui/src/main.rs to use let expressions in logic chains for more concise code. However, the review feedback correctly identifies that this syntax relies on the let_chains feature, which is currently unstable in Rust. Unless the project is specifically targeting the nightly toolchain, this change will cause compilation errors on stable Rust, so it is recommended to revert to nested if let statements.

Comment thread rutt-tui/src/main.rs
@denversc denversc merged commit e51b436 into dev Apr 5, 2026
6 checks passed
@denversc denversc deleted the gha branch April 5, 2026 05:13
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