ci: gitea workflow (lint + self-checks + tsc/vite build + cargo test)
npm run check aggregates the three node self-checks so CI (and humans) run them with one command. Node 23.6+ required for bare .ts execution.
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
# ponytail: two jobs, no matrix, no third-party actions beyond checkout +
|
||||
# setup-node (both mirrored on gitea.com and github) so this runs on any
|
||||
# act_runner config. Rust toolchain installs via rustup if missing.
|
||||
name: CI
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
frontend:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
# 23.6+ for native TS type-stripping (scripts/check-*.ts run bare .ts)
|
||||
node-version: 23
|
||||
- run: npm ci
|
||||
- run: npm run lint
|
||||
- run: npm run check
|
||||
- run: npm run build
|
||||
|
||||
rust:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install Tauri system deps
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends \
|
||||
libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev \
|
||||
librsvg2-dev pkg-config libssl-dev
|
||||
- name: Install Rust
|
||||
run: |
|
||||
if ! command -v rustup >/dev/null; then
|
||||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
|
||||
fi
|
||||
- run: cargo test --manifest-path src-tauri/Cargo.toml
|
||||
@@ -7,6 +7,7 @@
|
||||
"dev": "vite",
|
||||
"build": "tsc -b && vite build",
|
||||
"lint": "oxlint",
|
||||
"check": "node scripts/check-dice.ts && node scripts/check-encounter-budget.ts && node scripts/check-worldmap.ts",
|
||||
"preview": "vite preview",
|
||||
"tauri": "tauri"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user