Skip to content

Docs Improvements

Docs Improvements #125

Workflow file for this run

name: Rust Test Suite
on:
push:
branches: ["main"]
paths:
- .github/workflows/*_rust.yml
- src/**
- tests/**
- Cargo.lock
- Cargo.toml
- deny.toml
pull_request:
paths:
- .github/workflows/*_rust.yml
- src/**
- tests/**
- Cargo.lock
- Cargo.toml
- deny.toml
permissions:
contents: read
jobs:
test:
name: Rust test
strategy:
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
runs-on: ${{matrix.os}}
steps:
- name: Harden Runner
uses: step-security/harden-runner@0d381219ddf674d61a7572ddd19d7941e271515c # v2.9.0
with:
egress-policy: audit
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: dtolnay/rust-toolchain@d0592fe69e35bc8f12e3dbaf9ad2694d976cb8e3 # stable
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@6ec01d6033d5f6e87d04fc92d55eaa5b132b1ad4 # cargo-llvm-cov
- name: Run Cargo Clippy
run: cargo clippy
- name: Run Cargo Fmt
run: cargo fmt --check
- name: Run Cargo Deny
uses: EmbarkStudios/cargo-deny-action@3f4a782664881cf5725d0ffd23969fcce89fd868 # v1.6.3
if: ${{ matrix.os == 'ubuntu-latest' }}
- name: Generate coverage report from Rust tests
run: cargo llvm-cov --all-features --lcov --output-path lcov.info
- name: Run doc tests
run: cargo test --doc
- uses: codecov/codecov-action@e28ff129e5465c2c0dcc6f003fc735cb6ae0c673 # v4.5.0
with:
files: lcov.info
flags: lang-rust