36 lines
1.2 KiB
YAML
36 lines
1.2 KiB
YAML
name: ci
|
|
on: [push, pull_request]
|
|
jobs:
|
|
rust:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: 22, cache: npm, cache-dependency-path: web/package-lock.json }
|
|
- run: npm ci && npm run build
|
|
working-directory: web
|
|
- uses: dtolnay/rust-toolchain@1.89.0
|
|
with: { components: "rustfmt, clippy" }
|
|
- uses: Swatinem/rust-cache@v2
|
|
- run: sudo apt-get update && sudo apt-get install -y restic postgresql-client
|
|
- run: cargo fmt --all -- --check
|
|
- run: cargo clippy --workspace --all-targets -- -D warnings
|
|
- run: cargo test --workspace
|
|
supply-chain:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: EmbarkStudios/cargo-deny-action@v2
|
|
- run: cargo install cargo-audit --locked && cargo audit
|
|
web:
|
|
runs-on: ubuntu-latest
|
|
defaults: { run: { working-directory: web } }
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-node@v4
|
|
with: { node-version: 22, cache: npm, cache-dependency-path: web/package-lock.json }
|
|
- run: npm ci
|
|
- run: npm run typecheck
|
|
- run: npm test
|
|
- run: npm run build
|