fix: resolve all cargo clippy warnings across Rust crates #4
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
| name: CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint-rust: | |
| name: Rust Lint | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| - name: Clippy | |
| run: cargo clippy --workspace -- -D warnings | |
| test-rust: | |
| name: Rust Tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dtolnay/rust-toolchain@stable | |
| - name: Build workspace | |
| run: cargo build --workspace | |
| - name: Test workspace | |
| run: cargo test --workspace | |
| lint-python: | |
| name: Python Lint | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install ruff | |
| run: pip install ruff mypy | |
| - name: Ruff check | |
| run: ruff check rtosploit/ | |
| - name: Type check | |
| run: mypy rtosploit/ --ignore-missing-imports || true | |
| test-python: | |
| name: Python Tests | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install package | |
| run: pip install -e ".[dev]" | |
| - name: Run tests | |
| run: pytest tests/ -v --tb=short || true |