mirror of
https://github.com/lucaspalomodevelop/binbreak.git
synced 2026-03-13 00:07:28 +00:00
* chore: remove unnecessary needs_render checks from game logic * chore: remove needs_render flag and related logic from game state * chore: add rustfmt configuration file for consistent formatting * chore: clean up imports and formatting in app.rs, binary_numbers.rs, main_screen_widget.rs, rustfmt.toml, and utils.rs * chore: remove outdated comment from binary_numbers.rs * chore: remove outdated comments from binary_numbers.rs * chore: extract game over rendering logic into a separate function * run clippy fix * chore: add Clippy configuration files for linting thresholds * run clippy fix * chore: allow clippy warnings in selected places. check fix later * docs: add command docs for linting and formatting * docs: add command docs for linting and formatting * split BinaryNumbersPuzzle.render_ref into several sub functions for rendering different areas. * chore: adjust clippy lint levels to allow certain patterns * chore: add CI configuration with testing, clippy, and formatting jobs * cargo fmt * chore: simplify clippy and formatting commands in CI configuration * chore: consolidate cargo caching in CI configuration * chore: replace cargo caching with rust-cache action in CI configuration * chore: use is_multiple_of for streak check in score calculation * chore: simplify game over check in render logic
71 lines
1.3 KiB
YAML
71 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
branches: [ main, master ]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
rust: [stable]
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: ${{ matrix.rust }}
|
|
|
|
- name: Setup Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run tests
|
|
run: cargo test --verbose
|
|
|
|
clippy:
|
|
name: Clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
|
|
- name: Setup Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run clippy
|
|
run: cargo clippy
|
|
|
|
fmt:
|
|
name: Format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
|
|
- name: Setup Rust cache
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --check
|
|
|