Skip to content

Journal Theme Rust CI #5

Journal Theme Rust CI

Journal Theme Rust CI #5

# SPDX-License-Identifier: MPL-2.0
#
# Promoted from journal-theme/.github/workflows/rust-ci.yml (only root
# workflows run in this repo; the vendored copy is upstream history).
name: Journal Theme Rust CI
on:
push:
paths:
- 'journal-theme/**'
- '.github/workflows/journal-theme-rust-ci.yml'
pull_request:
paths:
- 'journal-theme/**'
- '.github/workflows/journal-theme-rust-ci.yml'
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -Dwarnings
defaults:
run:
working-directory: journal-theme
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
with:
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@6323deb102c322ba6fcbdcafc7e3dddab59af2b6 # 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # 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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v6
- uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable
- name: Install tarpaulin
run: cargo install cargo-tarpaulin
- name: Generate coverage
run: cargo tarpaulin --out Xml