Files
Starworld/.github/workflows/rust-quality.yml
copilot-swe-agent[bot] b75723bff9 Fix CI workflow YAML syntax errors
Co-authored-by: MayaTheShy <117858929+MayaTheShy@users.noreply.github.com>
2025-11-16 23:22:19 +00:00

66 lines
1.5 KiB
YAML

name: Rust Quality Checks
on:
push:
branches: [main, dev]
paths:
- 'bridge/**'
- '.github/workflows/rust-quality.yml'
pull_request:
branches: [main]
paths:
- 'bridge/**'
jobs:
rust-checks:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust nightly
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt, clippy
- name: Cache Rust dependencies
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
bridge/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('bridge/Cargo.lock', 'bridge/Cargo.toml') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Check formatting
run: |
cd bridge
cargo fmt -- --check
- name: Run clippy
run: |
cd bridge
cargo clippy --all-targets --all-features -- -D warnings
- name: Check for unused dependencies
run: |
cd bridge
cargo install cargo-udeps --locked || true
cargo +nightly udeps || true
- name: Security audit
run: |
cd bridge
cargo install cargo-audit --locked || true
cargo audit || true
- name: Build documentation
run: |
cd bridge
cargo doc --no-deps --document-private-items