# Gitea Actions workflow for the Rust workspace. # This workflow is host-runner friendly and does not touch real resource # directories. name: bat-rust on: push: branches: - "**" pull_request: workflow_dispatch: jobs: rust: name: Build and test Rust runs-on: host env: CARGO_TERM_COLOR: always RUST_BACKTRACE: 1 BAT_SKIP_ENV_FILE: "1" steps: - name: Checkout uses: actions/checkout@v4 - name: Install Rust toolchain uses: dtolnay/rust-toolchain@stable with: components: rustfmt,clippy - name: Show tool versions shell: bash run: | set -euo pipefail rustc --version cargo --version command -v curl command -v unzip - name: Check formatting shell: bash run: cargo fmt --all -- --check - name: Check workspace shell: bash run: cargo check --workspace --locked - name: Build workspace shell: bash run: cargo build --workspace --locked - name: Run clippy shell: bash run: cargo clippy --workspace --all-targets --locked -- -D warnings - name: Run tests shell: bash run: cargo test --workspace --locked