44 lines
903 B
YAML
44 lines
903 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: ["*"]
|
|
pull_request:
|
|
|
|
jobs:
|
|
ci:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
components: rustfmt, clippy
|
|
|
|
- uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
target
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
- uses: oven-sh/setup-bun@v2
|
|
|
|
- name: Build frontend
|
|
run: cd spa && bun install --frozen-lockfile && bun run build
|
|
|
|
- name: Check formatting
|
|
run: |
|
|
cargo fmt --all -- --check
|
|
cd spa && bun run check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy --workspace -- -D warnings
|
|
|
|
- name: Tests
|
|
run: cargo test --workspace
|
|
|
|
- name: TypeScript
|
|
run: cd spa && bun run typecheck
|