37 lines
798 B
YAML
37 lines
798 B
YAML
name: Code Quality
|
|
|
|
on:
|
|
push:
|
|
branches: ["master", "main"]
|
|
pull_request:
|
|
branches: ["master", "main"]
|
|
workflow_dispatch:
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
quality-checks:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- uses: ./.github/actions/deps
|
|
|
|
- name: Install Rust with tools
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt -- --check
|
|
|
|
- name: Run clippy
|
|
run: cargo clippy -- -D warnings
|
|
|
|
- name: Run unit tests
|
|
run: cargo test --quiet
|
|
|
|
- name: Check documentation
|
|
run: cargo doc --no-deps --document-private-items |