name: CI
permissions:
contents: read
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
quality-checks:
name: Quality Checks (${{ matrix.backend.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
backend:
- name: rust_crypto
flags: "--features redis"
- name: aws_lc_rs
flags: "--no-default-features --features aws_lc_rs,redis"
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32
- name: Format
if: matrix.backend.name == 'rust_crypto'
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets ${{ matrix.backend.flags }}
- name: Build
run: cargo build --release ${{ matrix.backend.flags }}
- name: Test
run: cargo test ${{ matrix.backend.flags }}
- name: Publish dry-run
if: matrix.backend.name == 'rust_crypto'
run: cargo publish --dry-run
security-audit:
name: Security Audit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: EmbarkStudios/cargo-deny-action@bb137d7af7e4fb67e5f82a49c4fce4fad40782fe with:
command: check advisories