Skip to content

Project Wharf Rust CI #2

Project Wharf Rust CI

Project Wharf Rust CI #2

# SPDX-License-Identifier: MPL-2.0
# SPDX-FileCopyrightText: 2025 Jonathan D.A. Jewell
#
# Promoted from project-wharf/.github/workflows/rust-ci.yml (only root
# workflows run in this repo; the vendored copy is upstream history).
name: Project Wharf Rust CI
on:
push:
paths:
- 'project-wharf/**'
- '.github/workflows/project-wharf-rust-ci.yml'
pull_request:
paths:
- 'project-wharf/**'
- '.github/workflows/project-wharf-rust-ci.yml'
permissions: read-all
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
defaults:
run:
working-directory: project-wharf
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: dtolnay/rust-toolchain@d0592fe69e35bc8f12e3dbaf9ad2694d976cb8e3 # stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy lints
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo test --all-features
- name: Build release
run: cargo build --release
security:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: dtolnay/rust-toolchain@d0592fe69e35bc8f12e3dbaf9ad2694d976cb8e3 # stable
- name: Install cargo-audit
run: cargo install cargo-audit
- name: Security audit
run: cargo audit
- name: Check for outdated deps
run: cargo install cargo-outdated && cargo outdated --exit-code 1 || true
coverage:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: dtolnay/rust-toolchain@d0592fe69e35bc8f12e3dbaf9ad2694d976cb8e3 # stable
- name: Install tarpaulin
run: cargo install cargo-tarpaulin
- name: Generate coverage
run: cargo tarpaulin --out Xml