Implement snapshots #133
Workflow file for this run
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: Rust CI | |
| on: | |
| push: | |
| branches: ['**'] | |
| pull_request: | |
| branches: ['**'] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build_and_test: | |
| name: Build and Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set Up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| components: clippy, rustfmt | |
| override: true | |
| - name: Cache Cargo Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Check Code Formatting | |
| run: cargo fmt --all -- --check | |
| - name: Install protoc for gRPC server | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Run Clippy (Linter) | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| - name: Build Project | |
| run: cargo build --verbose | |
| - name: Run Tests | |
| run: cargo test --verbose | |
| udeps: | |
| name: Unused Dependencies (cargo-udeps) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set Up Rust (nightly for udeps) | |
| uses: dtolnay/rust-toolchain@nightly | |
| - name: Cache Cargo Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install protoc for gRPC server | |
| run: sudo apt-get update && sudo apt-get install -y protobuf-compiler | |
| - name: Install cargo-udeps | |
| run: cargo +nightly install cargo-udeps --locked | |
| - name: Run cargo-udeps | |
| run: cargo +nightly udeps --workspace --all-targets --all-features | |
| taplo: | |
| name: Taplo (TOML formatting) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Set Up Rust (stable for cargo install) | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| override: true | |
| - name: Cache Cargo Dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Install taplo | |
| run: cargo +stable install taplo-cli --version ^0.9 --locked --force | |
| - name: Check TOML formatting with taplo | |
| run: taplo format --check |