mirror of
https://github.com/Xevion/dynamic-preauth.git
synced 2026-01-31 14:24:10 -06:00
Add automated dependency management with Renovate and comprehensive CI checks including formatting, clippy, audit, and frontend build validation.
105 lines
2.2 KiB
YAML
105 lines
2.2 KiB
YAML
name: Quality
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
format:
|
|
name: Format
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt -- --check
|
|
|
|
- name: Check demo formatting
|
|
run: cargo fmt --manifest-path demo/Cargo.toml -- --check
|
|
|
|
clippy:
|
|
name: Clippy
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: clippy
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run clippy
|
|
run: cargo clippy --all-targets --all-features -- -D warnings
|
|
|
|
- name: Run clippy on demo
|
|
run: cargo clippy --manifest-path demo/Cargo.toml --all-targets --all-features -- -D warnings
|
|
|
|
audit:
|
|
name: Audit
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: taiki-e/install-action@cargo-audit
|
|
|
|
- name: Run audit
|
|
run: cargo audit
|
|
|
|
- name: Run audit on demo
|
|
run: cargo audit --file demo/Cargo.lock
|
|
|
|
check:
|
|
name: Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install Rust
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Run check
|
|
run: cargo check --all-targets --all-features
|
|
|
|
- name: Run check on demo
|
|
run: cargo check --manifest-path demo/Cargo.toml --all-targets --all-features
|
|
|
|
frontend:
|
|
name: Frontend
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: frontend
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v4
|
|
with:
|
|
version: 9
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: pnpm
|
|
cache-dependency-path: frontend/pnpm-lock.yaml
|
|
|
|
- name: Install dependencies
|
|
run: pnpm install --frozen-lockfile
|
|
|
|
- name: Type check
|
|
run: pnpm astro check
|
|
|
|
- name: Build
|
|
run: pnpm build
|