name: CI on: push: pull_request: jobs: test: runs-on: docker container: rust:1-bookworm steps: - name: Checkout uses: https://code.forgejo.org/actions/checkout@v4 - name: Cache cargo registry and build artifacts uses: https://code.forgejo.org/actions/cache@v4 with: path: | ~/.cargo/registry ~/.cargo/git target key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.lock') }} restore-keys: | cargo-${{ runner.os }}- - name: Install rustfmt and clippy run: rustup component add rustfmt clippy - name: Check formatting run: cargo fmt -- --check - name: Lint run: cargo clippy --all-targets -- -D warnings - name: Build run: cargo build - name: Test run: cargo test