43 lines
922 B
YAML
43 lines
922 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@stable
|
|
with:
|
|
toolchain: '1.92'
|
|
components: rustfmt, clippy
|
|
|
|
- name: Cache Rust build
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Check Rust formatting
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Run Clippy
|
|
run: cargo clippy --all-targets -- -D warnings
|
|
|
|
- name: Run Rust tests
|
|
run: cargo test --all-targets
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '22'
|
|
cache: npm
|
|
cache-dependency-path: frontend/package-lock.json
|
|
|
|
- name: Build frontend
|
|
working-directory: frontend
|
|
run: npm ci && npm run build
|