Files
freemkv-keysources/.github/workflows/ci.yml
T
matthew d1a4ec9a3f ci: add CI workflow (fmt + clippy -D warnings + test on Rust 1.86)
The crate previously had only leak-guard.yml and release.yml, so its ~42
tests never ran on push/PR — only on tag. Mirror the sibling crates'
ci.yml (lint + test jobs, dtolnay/rust-toolchain@1.86.0, rust-cache).
No --locked: this library does not track Cargo.lock (release.yml notes
--locked would fail on a fresh runner).
2026-06-25 17:58:30 -07:00

37 lines
968 B
YAML

name: CI
on:
push:
branches: [main]
pull_request:
# freemkv-keysources depends on libfreemkv from crates.io (see Cargo.toml).
# No sibling-repo checkout is needed.
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.86.0
with:
components: clippy, rustfmt
# Cache ~/.cargo/registry + target/ across runs. Saves ~30-60s
# of crates.io index download per job; incremental compilation
# helps on re-runs that don't bump Cargo.lock.
- uses: Swatinem/rust-cache@v2
with:
shared-key: freemkv-keysources-ci
- run: cargo fmt --check
- run: cargo clippy -- -D warnings
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@1.86.0
- uses: Swatinem/rust-cache@v2
with:
shared-key: freemkv-keysources-ci
- run: cargo test --locked